Class Region

  • All Implemented Interfaces:
    IRegion
    Direct Known Subclasses:
    TypedRegion

    public class Region
    extends java.lang.Object
    implements IRegion
    The default implementation of the IRegion interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      Region​(int offset, int length)
      Create a new region.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int getLength()
      Returns the length of the region.
      int getOffset()
      Returns the offset of the region.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Region

        public Region​(int offset,
                      int length)
        Create a new region.
        Parameters:
        offset - the offset of the region
        length - the length of the region
    • Method Detail

      • getLength

        public int getLength()
        Description copied from interface: IRegion
        Returns the length of the region.
        Specified by:
        getLength in interface IRegion
        Returns:
        the length of the region
      • getOffset

        public int getOffset()
        Description copied from interface: IRegion
        Returns the offset of the region.
        Specified by:
        getOffset in interface IRegion
        Returns:
        the offset of the region
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object