Package org.plumelib.util
Class Intern.Subsequence<T extends @Interned Object>
java.lang.Object
org.plumelib.util.Intern.Subsequence<T>
- Type Parameters:
T- the type of elements of the sequence
- Enclosing class:
- Intern
A subsequence view on a sequence. Actually, this imposes no semantics. It just has 3 fields: an
interned sequence, a start index, and an end index. Requires that the sequence be interned.
Used for interning the repeated finding of subsequences on the same sequence.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSubsequence(T seq, @org.checkerframework.checker.index.qual.NonNegative int start, int end) Creates a subsequence view. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanequalsSubsequence(@GuardSatisfied Intern.Subsequence<T> other) Returns true if this object equals the given one.inthashCode()toString()
-
Field Details
-
seq
The full sequence. The Subsequence object represents part of this sequence. -
start
public @org.checkerframework.checker.index.qual.NonNegative int startThe start index, inclusive. -
end
public int endThe end index.
-
-
Constructor Details
-
Subsequence
Creates a subsequence view.- Parameters:
seq- an interned arraystart- the start indexend- the end index
-
-
Method Details
-
equals
-
equalsSubsequence
@Pure public boolean equalsSubsequence(@GuardSatisfied Intern.Subsequence<T extends @Interned Object> this, @GuardSatisfied Intern.Subsequence<T> other) Returns true if this object equals the given one.- Parameters:
other- the sequence to compare to- Returns:
- true if this object equals
other
-
hashCode
-
toString
-