|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.upenn.gloDB.AbstractFeature
edu.upenn.gloDB.ExactFeature
public class ExactFeature
These objects store exact positions bounding a Feature. For point Features just set start and stop equal. At some point it might be advantageous to create a PointFeature class which would only have one position.
Field Summary | |
---|---|
private int |
start
The initial position defining this Feature. |
private int |
stop
The last position defining this Feature. |
Fields inherited from class edu.upenn.gloDB.AbstractFeature |
---|
attributes, source |
Constructor Summary | |
---|---|
ExactFeature(int start,
int stop,
Sequence source)
Create a new ExactFeature object and add it to the set of Feature objects. |
|
ExactFeature(int start,
int stop,
Sequence source,
boolean addToPool)
Create a new ExactFeature object and add the newly created ExactFeature object to the set of Feature objects if addToPool is true. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
boolean |
contains(Feature feature)
Returns 'true' if the Feature 'feature' exists within this Feature. |
int |
contains(int pos)
Returns '-1' if this Feature exists after the integer 'pos', returns '0' if 'pos' is contained in this Feature, and '1' if 'pos' occurs after this Feature. |
boolean |
equals(java.lang.Object o)
This will return true if the features are equal and the sources are the same. |
Feature |
flip()
Inverts the positions, returning a new Feature object. |
java.lang.String |
getData()
Returns the Sequence data from start to stop. |
java.lang.String |
getDataFormatted()
Returns the Sequence data from start to stop, with "\n" inserted every Sequence.FORMAT_WIDTH characters (usually 50 to 80 chars). |
int |
getMax()
Returns the maximum position of the Feature. |
int |
getMin()
Returns the initial position of the Feature. |
int |
getStart()
Returns the start position. |
int |
getStop()
Returns the stop position. |
int |
length()
Returns the number of positions contained in the Feature ((stop - start) + 1). |
Feature |
overlap(Feature feature)
Returns the overlapping region between the two Features. |
boolean |
overlaps(Feature feature)
Returns 'true' if the Feature 'feature' has a position that overlaps this Feature. |
java.lang.String |
toString()
Only basic Feature information. |
java.lang.String |
toStringFull()
Returns all Feature information. |
java.lang.String |
toStringMin()
Only returns start/stop position information. |
Methods inherited from class edu.upenn.gloDB.AbstractFeature |
---|
addAttribute, addAttribute, containsAttribute, delAttribute, getAttribute, getAttributes, getAttributesMap, getSource, getSourceID, getType, setAttributes, setAttributes |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int start
private int stop
Constructor Detail |
---|
public ExactFeature(int start, int stop, Sequence source)
public ExactFeature(int start, int stop, Sequence source, boolean addToPool)
Method Detail |
---|
public int getStart()
public int getStop()
public java.lang.String getData()
public java.lang.String getDataFormatted()
public int length()
public int getMin()
public int getMax()
public Feature flip()
public int contains(int pos)
public boolean contains(Feature feature)
public boolean overlaps(Feature feature)
public Feature overlap(Feature feature)
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
java.lang.ClassCastException
public boolean equals(java.lang.Object o) throws java.lang.ClassCastException
equals
in interface Feature
equals
in class java.lang.Object
java.lang.ClassCastException
public java.lang.String toString()
toString
in interface Feature
toString
in class AbstractFeature
public java.lang.String toStringMin()
public java.lang.String toStringFull()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |