OptionalInt (ContractValue value, boolean equal) { ContractValue other = getValueComparedTo(value, equal); return other instanceof Argument ? OptionalInt.of(((Argument)other).myIndex) : OptionalInt.empty(); }