-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReEnzyme.java
More file actions
75 lines (68 loc) · 1.42 KB
/
ReEnzyme.java
File metadata and controls
75 lines (68 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import java.util.ArrayList;
/**
Matt Hamada
This class encodes restrictin enzyme objects.
They contain cutsite sequence Strings, and name Strings.
global arraylist ENZLIBRARY holds all ReEnzyme objects created
*/
public class ReEnzyme
{
//will hold all ReEnzyme objects created
public static ArrayList<ReEnzyme> ENZLIBRARY = new ArrayList<ReEnzyme>();
private String name;
private String cutSeq;
/**
Constructor. Assigns name and cutseq.
will add to global list
@param n ReEnzyme name
@param cs cut sequence
*/
public ReEnzyme(String n, String cs)
{
name = n;
cutSeq = cs;
//add to list
ENZLIBRARY.add(this);
}
//accessors and mutators
/**
getName will return the name in string form
@return a string of the ReEnzyme name
*/
public String getName()
{
return name;
}
/**
getCutSeq will return a stirng of the cut sequence
@return A string of the cutsequence
*/
public String getCutSeq()
{
return cutSeq;
}
/**
setName will set name of reEnzyme object
@param newName name of ReEnzyme object to be set.
*/
public void setName(String newName)
{
name = newName;
}
/**
setCutSeq will set cutSeq of reEnzyme object
@param newCutSeq cutSeq of ReEnzyme object to be set.
*/
public void setCutSeq(String newCutSeq)
{
cutSeq = newCutSeq;
}
/**
toString will overwrite the default method
will allow list n GUI to show enzyme names
*/
public String toString()
{
return name;
}
}