Class FuzzyPoint
- java.lang.Object
-
- org.biojava.nbio.core.sequence.location.SimplePoint
-
- org.biojava.nbio.core.sequence.location.FuzzyPoint
-
- All Implemented Interfaces:
Serializable,Comparable<Point>,Point
public class FuzzyPoint extends SimplePoint
Implementation for resolving fuzzy locations. Caches the calculated value.- 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>
-
-
Field Summary
Fields Modifier and Type Field Description static Point.Resolver<FuzzyPoint>MAX_RESOLVERAlways uses the max point to resolve a locationstatic Point.Resolver<FuzzyPoint>MEAN_RESOLVERCombines min and max and then gets the mean of itstatic Point.Resolver<FuzzyPoint>MIN_RESOLVERAlways uses the min point to resolve a location
-
Constructor Summary
Constructors Constructor Description FuzzyPoint(int minPoint, int maxPoint)FuzzyPoint(int minPoint, int maxPoint, Point.Resolver<FuzzyPoint> resolver)FuzzyPoint(int minPoint, int maxPoint, Point.Resolver<FuzzyPoint> resolver, boolean unknown, boolean uncertain)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Point point)booleanequals(Object obj)protected IntegergetMax()protected IntegergetMin()IntegergetPosition()Returns the position held by this objectprotected Point.Resolver<FuzzyPoint>getResolver()inthashCode()Pointoffset(int distance)Returns a new point offset by the given distancePointreverse(int length)Returns the equivalent position on the reverse strand-
Methods inherited from class org.biojava.nbio.core.sequence.location.SimplePoint
clonePoint, isHigher, isLower, isUncertain, isUnknown, reverse, setPosition, setUncertain, setUnknown, toString
-
-
-
-
Field Detail
-
MIN_RESOLVER
public static final Point.Resolver<FuzzyPoint> MIN_RESOLVER
Always uses the min point to resolve a location
-
MAX_RESOLVER
public static final Point.Resolver<FuzzyPoint> MAX_RESOLVER
Always uses the max point to resolve a location
-
MEAN_RESOLVER
public static final Point.Resolver<FuzzyPoint> MEAN_RESOLVER
Combines min and max and then gets the mean of it
-
-
Constructor Detail
-
FuzzyPoint
public FuzzyPoint(int minPoint, int maxPoint)
-
FuzzyPoint
public FuzzyPoint(int minPoint, int maxPoint, Point.Resolver<FuzzyPoint> resolver)
-
FuzzyPoint
public FuzzyPoint(int minPoint, int maxPoint, Point.Resolver<FuzzyPoint> resolver, 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- Overrides:
getPositionin classSimplePoint
-
getResolver
protected Point.Resolver<FuzzyPoint> getResolver()
-
reverse
public Point reverse(int length)
Description copied from interface:PointReturns the equivalent position on the reverse strand- Specified by:
reversein interfacePoint- Overrides:
reversein classSimplePoint- Parameters:
length- Length of the sequence to translate to
-
offset
public Point offset(int distance)
Description copied from interface:PointReturns a new point offset by the given distance- Specified by:
offsetin interfacePoint- Overrides:
offsetin classSimplePoint
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classSimplePoint
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSimplePoint
-
compareTo
public int compareTo(Point point)
- Specified by:
compareToin interfaceComparable<Point>- Overrides:
compareToin classSimplePoint
-
-