Class SimplePoint
java.lang.Object
org.biojava.nbio.core.sequence.location.SimplePoint
- All Implemented Interfaces:
Serializable
,Comparable<Point>
,Point
- Direct Known Subclasses:
FuzzyPoint
Basic implementation of the Point interface.
- Author:
- ayates
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojava.nbio.core.sequence.location.template.Point
Point.Resolver<T extends Point>
-
Constructor Summary
ModifierConstructorDescriptionprotected
SimplePoint
(int position) SimplePoint
(int position, boolean unknown, boolean uncertain) -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this pointint
boolean
Returns the position held by this objectint
hashCode()
boolean
Returns true if the point is higher in value to the current pointboolean
Returns true if the current point is at a lower position than the point given.boolean
Returns a true if the exact point is unknown.boolean
Returns true if the current position is unknown but is beyond the position encoded for.offset
(int distance) Returns a new point offset by the given distancereverse
(int length) Returns the equivalent position on the reverse strandprotected int
reverse
(int position, int length) protected void
setPosition
(int position) protected void
setUncertain
(boolean uncertain) protected void
setUnknown
(boolean unknown) toString()
-
Constructor Details
-
SimplePoint
protected SimplePoint() -
SimplePoint
public SimplePoint(int position) -
SimplePoint
public SimplePoint(int position, boolean unknown, boolean uncertain)
-
-
Method Details
-
getPosition
Description copied from interface:Point
Returns the position held by this object- Specified by:
getPosition
in interfacePoint
-
setPosition
protected void setPosition(int position) -
isUnknown
public boolean isUnknown()Description copied from interface:Point
Returns true if the current position is unknown but is beyond the position encoded for. This is the same as the position>80
as encoded by UniProt. -
setUnknown
protected void setUnknown(boolean unknown) -
isUncertain
public boolean isUncertain()Description copied from interface:Point
Returns a true if the exact point is unknown. Equivalent position from UniProt is?80
.- Specified by:
isUncertain
in interfacePoint
-
setUncertain
protected void setUncertain(boolean uncertain) -
reverse
Description copied from interface:Point
Returns the equivalent position on the reverse strand -
offset
Description copied from interface:Point
Returns a new point offset by the given distance -
reverse
protected int reverse(int position, int length) -
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Point>
-
isLower
Description copied from interface:Point
Returns true if the current point is at a lower position than the point given. -
isHigher
Description copied from interface:Point
Returns true if the point is higher in value to the current point -
clonePoint
Description copied from interface:Point
Returns a copy of this point- Specified by:
clonePoint
in interfacePoint
-