class UnitValueBoxPair {

  public Unit unit;
  public ValueBox valueBox;

  /**
   * Constructs a UnitValueBoxPair from a Unit object and a ValueBox object.
   * 
   * @param unit
   *          some Unit
   * @param valueBox
   *          some ValueBox
   */
  public UnitValueBoxPair(Unit unit, ValueBox valueBox) {
    this.unit = unit;
    this.valueBox = valueBox;
  }

  /**
   * Two UnitValueBoxPairs are equal iff they the Units they hold are 'equal' and the ValueBoxes they hold are 'equal'.
   * 
   * @param other
   *          another UnitValueBoxPair
   * @return true if equal.
   */
  @Override
  public boolean equals(Object other) {<FILL_FUNCTION_BODY>}

  @Override
  public int hashCode() {
    return unit.hashCode() + valueBox.hashCode();
  }

  @Override
  public String toString() {
    return valueBox + " in " + unit;
  }

  public Unit getUnit() {
    return unit;
  }

  public ValueBox getValueBox() {
    return valueBox;
  }
}

    if (other instanceof UnitValueBoxPair) {
      UnitValueBoxPair otherPair = (UnitValueBoxPair) other;
      if (this.unit.equals(otherPair.unit) && this.valueBox.equals(otherPair.valueBox)) {
        return true;
      }
    }
    return false;
  
<no_super_class>