Class UnitValueBoxPair


  • public class UnitValueBoxPair
    extends Object
    Utility class used to package a Unit and a ValueBox together.
    • Constructor Detail

      • UnitValueBoxPair

        public UnitValueBoxPair​(Unit unit,
                                ValueBox valueBox)
        Constructs a UnitValueBoxPair from a Unit object and a ValueBox object.
        Parameters:
        unit - some Unit
        valueBox - some ValueBox
    • Method Detail

      • equals

        public boolean equals​(Object other)
        Two UnitValueBoxPairs are equal iff they the Units they hold are 'equal' and the ValueBoxes they hold are 'equal'.
        Overrides:
        equals in class Object
        Parameters:
        other - another UnitValueBoxPair
        Returns:
        true if equal.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getUnit

        public Unit getUnit()
      • getValueBox

        public ValueBox getValueBox()