Class MutablePair

  • All Implemented Interfaces:

    
    public final class MutablePair<A extends Object, B extends Object>
    
                        

    A mutable pair of values.

    There is no meaning attached to values in this class, it can be used for any purpose. Pair exhibits value semantics, i.e. two pairs are equal if both components are equal.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private A first
      private B second
    • Constructor Summary

      Constructors 
      Constructor Description
      MutablePair(A first, B second) Creates a new instance of Pair.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final A getFirst() First value.
      final Unit setFirst(A first) First value.
      final B getSecond() Second value.
      final Unit setSecond(B second) Second value.
      String toString() Returns string representation of the MutablePair including its first and second values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait