Class Pair<CAR,CDR>

java.lang.Object
org.nustaq.kontraktor.util.Pair<CAR,CDR>
All Implemented Interfaces:
Serializable

public class Pair<CAR,CDR> extends Object implements Serializable
Created by ruedi on 03/05/15. A simple pair class. Though it has methods for mutation, it should be considered IMMUTABLE. Mutation should be used for init/setup only and Pair will be treated like a real immutable by kontraktor.
See Also:
  • Constructor Details

    • Pair

      public Pair(CAR CAR, CDR CDR)
    • Pair

      public Pair()
  • Method Details

    • getFirst

      public CAR getFirst()
    • getSecond

      public CDR getSecond()
    • car

      public CAR car()
    • cdr

      public CDR cdr()
    • car

      public Pair car(CAR car)
    • cdr

      public Pair cdr(CDR cdr)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • allNull

      public boolean allNull()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object