Class SimplePoint

java.lang.Object
org.biojava3.core.sequence.location.SimplePoint
All Implemented Interfaces:
Comparable<Point>, Point
Direct Known Subclasses:
FuzzyPoint

public class SimplePoint extends Object implements Point
Basic implementation of the Point interface.
Author:
ayates
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.biojava3.core.sequence.location.template.Point

    Point.Resolver<T extends Point>
  • Constructor Summary

    Constructors
    Constructor
    Description
    SimplePoint(int position)
     
    SimplePoint(int position, boolean unknown, boolean uncertain)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a copy of this point
    int
     
    boolean
     
    Returns the position held by this object
    int
     
    boolean
    isHigher(Point point)
    Returns true if the point is higher in value to the current point
    boolean
    isLower(Point point)
    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 distance
    reverse(int length)
    Returns the equivalent position on the reverse strand
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SimplePoint

      public SimplePoint(int position)
    • SimplePoint

      public SimplePoint(int position, boolean unknown, boolean uncertain)
  • Method Details

    • getPosition

      public Integer getPosition()
      Description copied from interface: Point
      Returns the position held by this object
      Specified by:
      getPosition in interface Point
    • 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.
      Specified by:
      isUnknown in interface Point
    • 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 interface Point
    • 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
      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
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Point o)
      Specified by:
      compareTo in interface Comparable<Point>
    • isLower

      public boolean isLower(Point point)
      Description copied from interface: Point
      Returns true if the current point is at a lower position than the point given.
      Specified by:
      isLower in interface Point
    • isHigher

      public boolean isHigher(Point point)
      Description copied from interface: Point
      Returns true if the point is higher in value to the current point
      Specified by:
      isHigher in interface Point
    • clonePoint

      public Point clonePoint()
      Description copied from interface: Point
      Returns a copy of this point
      Specified by:
      clonePoint in interface Point