MethodContract (ContractValue condition, ContractReturnValue returnValue) { return new MethodContract(returnValue) { @Override String getArgumentsPresentation() { return "("+condition.toString()+")"; } @Override public List<ContractValue> getConditions() { return Collections.singletonList(condition); } }; }