Class FuzzyPoint

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Point>, Point

    public class FuzzyPoint
    extends SimplePoint
    Implementation for resolving fuzzy locations. Caches the calculated value.
    Author:
    ayates
    See Also:
    Serialized Form
    • 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,
                          boolean unknown,
                          boolean uncertain)
    • Method Detail

      • getPosition

        public java.lang.Integer getPosition()
        Description copied from interface: Point
        Returns the position held by this object
        Specified by:
        getPosition in interface Point
        Overrides:
        getPosition in class SimplePoint
      • getMax

        protected java.lang.Integer getMax()
      • getMin

        protected java.lang.Integer getMin()
      • reverse

        public Point reverse​(int length)
        Description copied from interface: Point
        Returns the equivalent position on the reverse strand
        Specified by:
        reverse in interface Point
        Overrides:
        reverse in class SimplePoint
        Parameters:
        length - Length of the sequence to translate to
      • offset

        public Point offset​(int distance)
        Description copied from interface: Point
        Returns a new point offset by the given distance
        Specified by:
        offset in interface Point
        Overrides:
        offset in class SimplePoint
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class SimplePoint
      • compareTo

        public int compareTo​(Point point)
        Specified by:
        compareTo in interface java.lang.Comparable<Point>
        Overrides:
        compareTo in class SimplePoint