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

private static final class Intern.Subsequence<T extends @Interned Object> extends Object
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
    Modifier and Type
    Field
    Description
    int
    The end index.
    The full sequence.
    @org.checkerframework.checker.index.qual.NonNegative int
    The start index, inclusive.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Subsequence(T seq, @org.checkerframework.checker.index.qual.NonNegative int start, int end)
    Creates a subsequence view.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(@GuardSatisfied @Nullable Object other)
     
    boolean
    equalsSubsequence(@GuardSatisfied Intern.Subsequence<T> other)
    Returns true if this object equals the given one.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • seq

      public T extends @Interned Object seq
      The full sequence. The Subsequence object represents part of this sequence.
    • start

      public @org.checkerframework.checker.index.qual.NonNegative int start
      The start index, inclusive.
    • end

      public int end
      The end index.
  • Constructor Details

    • Subsequence

      public Subsequence(T seq, @org.checkerframework.checker.index.qual.NonNegative int start, int end)
      Creates a subsequence view.
      Parameters:
      seq - an interned array
      start - the start index
      end - the end index
  • Method Details

    • equals

      @Pure public boolean equals(@GuardSatisfied Intern.Subsequence<T extends @Interned Object> this, @GuardSatisfied @Nullable Object other)
      Overrides:
      equals in class Object
    • 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

      @Pure public int hashCode(@GuardSatisfied Intern.Subsequence<T extends @Interned Object> this)
      Overrides:
      hashCode in class Object
    • toString

      @SideEffectFree public String toString(@GuardSatisfied Intern.Subsequence<T extends @Interned Object> this)
      Overrides:
      toString in class Object