pla.data
Class Occurrence
java.lang.Object
pla.data.NamedThing
pla.data.NodeThing
pla.data.Occurrence
- All Implemented Interfaces:
- Comparable
public class Occurrence
- extends NodeThing
Encapsulating an Occurrence.
Occurrences are ordered in a special way.
As complexes are modeled using 3 characters '(', ':', and ')'
we are ignoring these when sorting, so that for example,
"(Ikb:(Nfkb1:Rela))-CLc" would appear between "Ifnggene-on-NUc"
and "Ikb-degraded-CLc".
- Author:
- linda
Occurrence
public Occurrence(String name,
int ID)
- Construct an Occurrence. The given name must be non-null
and non-empty (after trimming), otherwise constructor throws
a
RuntimeException. Uses the name also as the
long name since it cannot be null.
- Parameters:
name - String containing nameID - numerical ID (used for identification)
Occurrence
public Occurrence(String name,
int ID,
String longName)
- Construct an Occurrence with an associated long name.
The given name must be non-null
and non-empty (after trimming), otherwise constructor throws
a
RuntimeException.
- Parameters:
name - String containing nameID - numerical ID (used for identification)longName - String containing a long name
Occurrence
public Occurrence(Occurrence o)
- Construct an Occurrence as a clone of a given one.
- Parameters:
o - Occurrence to be cloned
compareTo
public int compareTo(Object o)
- Specified by:
compareTo in interface Comparable- Overrides:
compareTo in class NodeThing
equals
public boolean equals(Object o)
- Overrides:
equals in class NodeThing