Class ContentInterval

java.lang.Object
ro.sync.ecss.extensions.api.ContentInterval

@API(type=NOT_EXTENDABLE, src=PUBLIC) public class ContentInterval extends Object
A content interval containing the inclusive start offset and exclusive end offset.
Since:
14
  • Constructor Details

    • ContentInterval

      public ContentInterval(int startOffset, int endOffset)
      Constructor.
      Parameters:
      startOffset - Interval inclusive start offset.
      endOffset - Interval exclusive end offset.
  • Method Details

    • getStartOffset

      public int getStartOffset()
      Returns:
      Returns the content interval inclusive start offset.
    • getEndOffset

      public int getEndOffset()
      Returns:
      Returns the content interval exclusive end offset.
    • getLength

      public int getLength()
      Returns:
      The length of the interval.
      Since:
      24
    • contains

      public boolean contains(int offset)
      Checks whether the interval contains the given offset.
      Parameters:
      offset - An offset.
      Returns:
      true if the offset is contained in the interval.
      Since:
      24
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object
      See Also: