Class AbstractMutablePair<T,​U>

Object
AbstractPair<T,​U>
AbstractMutablePair<T,​U>
Direct Known Subclasses:
MutablePair

public abstract class AbstractMutablePair<T,​U>
extends AbstractPair<T,​U>
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractMutablePair()  
  • Method Summary

    Modifier and Type Method Description
    abstract T setFirst​(T first)
    Sets the first item in the pair and returns the old value
    abstract U setSecond​(U second)
    Sets the second item in the pair and returns the old value

    Methods inherited from class AbstractPair

    getFirst, getSecond, toString

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • setFirst

      public abstract T setFirst​(T first)
      Sets the first item in the pair and returns the old value
      Parameters:
      first - the future value of the first item
      Returns:
      the old value of the first item
    • setSecond

      public abstract U setSecond​(U second)
      Sets the second item in the pair and returns the old value
      Parameters:
      second - the future value of the second item
      Returns:
      the old value of the second item