boolean (Value val1, Value val2) { if (val1 == null) { return val2 == null; } if (val2 == null) { return false; } if (val1 instanceof StringReference && val2 instanceof StringReference) { return ((StringReference)val1).value().equals(((StringReference)val2).value()); } return val1.equals(val2); }