Class SimplePoint
- java.lang.Object
-
- org.biojava.nbio.core.sequence.location.SimplePoint
-
- All Implemented Interfaces:
Serializable,Comparable<Point>,Point
- Direct Known Subclasses:
FuzzyPoint
public class SimplePoint extends Object implements Serializable, Point
Basic implementation of the Point interface.- Author:
- ayates
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.biojava.nbio.core.sequence.location.template.Point
Point.Resolver<T extends Point>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSimplePoint()SimplePoint(int position)SimplePoint(int position, boolean unknown, boolean uncertain)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointclonePoint()Returns a copy of this pointintcompareTo(Point o)booleanequals(Object obj)IntegergetPosition()Returns the position held by this objectinthashCode()booleanisHigher(Point point)Returns true if the point is higher in value to the current pointbooleanisLower(Point point)Returns true if the current point is at a lower position than the point given.booleanisUncertain()Returns a true if the exact point is unknown.booleanisUnknown()Returns true if the current position is unknown but is beyond the position encoded for.Pointoffset(int distance)Returns a new point offset by the given distancePointreverse(int length)Returns the equivalent position on the reverse strandprotected intreverse(int position, int length)protected voidsetPosition(int position)protected voidsetUncertain(boolean uncertain)protected voidsetUnknown(boolean unknown)StringtoString()
-
-
-
Constructor Detail
-
SimplePoint
protected SimplePoint()
-
SimplePoint
public SimplePoint(int position)
-
SimplePoint
public SimplePoint(int position, boolean unknown, boolean uncertain)
-
-
Method Detail
-
getPosition
public Integer getPosition()
Description copied from interface:PointReturns the position held by this object- Specified by:
getPositionin interfacePoint
-
setPosition
protected void setPosition(int position)
-
isUnknown
public boolean isUnknown()
Description copied from interface:PointReturns 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:PointReturns a true if the exact point is unknown. Equivalent position from UniProt is?80
.- Specified by:
isUncertainin interfacePoint
-
setUncertain
protected void setUncertain(boolean uncertain)
-
reverse
public Point reverse(int length)
Description copied from interface:PointReturns the equivalent position on the reverse strand
-
offset
public Point offset(int distance)
Description copied from interface:PointReturns a new point offset by the given distance
-
reverse
protected int reverse(int position, int length)
-
compareTo
public int compareTo(Point o)
- Specified by:
compareToin interfaceComparable<Point>
-
isLower
public boolean isLower(Point point)
Description copied from interface:PointReturns true if the current point is at a lower position than the point given.
-
isHigher
public boolean isHigher(Point point)
Description copied from interface:PointReturns true if the point is higher in value to the current point
-
clonePoint
public Point clonePoint()
Description copied from interface:PointReturns a copy of this point- Specified by:
clonePointin interfacePoint
-
-