Class CollectionsPlume.Replacement<T>

java.lang.Object
org.plumelib.util.CollectionsPlume.Replacement<T>
Type Parameters:
T - the type of collection elements
Enclosing class:
CollectionsPlume

public static class CollectionsPlume.Replacement<T> extends Object
Represents a replacement of one range of a collection by another collection.
  • Field Details

    • start

      public final int start
      The first line to replace, inclusive.
    • end

      public final int end
      The last line to replace, inclusive. May be equal to start-1.
  • Method Details

    • of

      public static <T> CollectionsPlume.Replacement<T> of(int start, int end, Collection<T> elements)
      Creates a new Replacement.
      Type Parameters:
      T - the type of elements of the list
      Parameters:
      start - the first line to replace, inclusive
      end - the last line to replace, exclusive
      elements - the new (replacement) elements
      Returns:
      a new Replacement
    • toString

      public String toString(@GuardSatisfied CollectionsPlume.Replacement<T> this)
      Overrides:
      toString in class Object