Class Range

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable

    public final class Range
    extends java.lang.Object
    implements java.io.Externalizable
    The range described with at least one bound (begin or end position) and optional size.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Range()  
      Range​(long beg, long end, long size)  
      Range​(Range other)
      Copy constructor
      Range​(java.lang.String rawRange)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getBeg()  
      long getEnd()  
      long getSize()
      Note that this method may return -1 if begin and end are set (size is not -1 actually)
      void readExternal​(java.io.ObjectInput in)  
      java.lang.String toString()  
      void writeExternal​(java.io.ObjectOutput out)  
      • Methods inherited from class java.lang.Object

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

      • Range

        public Range()
      • Range

        public Range​(Range other)
        Copy constructor
      • Range

        public Range​(long beg,
                     long end,
                     long size)
      • Range

        public Range​(java.lang.String rawRange)
              throws InvalidRangeException,
                     java.lang.NumberFormatException
        Parameters:
        rawRange - range textual representation
        Throws:
        InvalidRangeException
        java.lang.NumberFormatException
    • Method Detail

      • getBeg

        public final long getBeg()
        Returns:
        range start offset
      • getEnd

        public final long getEnd()
        Returns:
        range end offset
      • getSize

        public final long getSize()
        Note that this method may return -1 if begin and end are set (size is not -1 actually)
        Returns:
        the size of the range having no position
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        the range textual representation
      • writeExternal

        public final void writeExternal​(java.io.ObjectOutput out)
                                 throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • readExternal

        public final void readExternal​(java.io.ObjectInput in)
                                throws java.io.IOException,
                                       java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException