void () { if (!SchemaResolveState.normal.equals(myState)) { myChildOperations.clear(); myAnyOfGroup.clear(); myOneOfGroup.clear(); return; } // lets do that to make the returned object smaller myAnyOfGroup.forEach(Operation::clearVariants); myOneOfGroup.forEach(list -> list.forEach(Operation::clearVariants)); for (Operation myChildOperation : myChildOperations) { myChildOperation.doReduce(); } reduce(); myChildOperations.clear(); }