Package ro.sync.ecss.extensions.api
Class ContentInterval
- java.lang.Object
-
- ro.sync.ecss.extensions.api.ContentInterval
-
@API(type=NOT_EXTENDABLE, src=PUBLIC) public class ContentInterval extends java.lang.Object
A content interval containing the inclusive start offset and exclusive end offset.- Since:
- 14
-
-
Constructor Summary
Constructors Constructor Description ContentInterval(int startOffset, int endOffset)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(int offset)
Checks whether the interval contains the given offset.boolean
equals(java.lang.Object obj)
int
getEndOffset()
int
getLength()
int
getStartOffset()
int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
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(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-