MyReader (PairConsumer<JsonSchemaObject, Integer> propertySetter) { return (element, object, queue, virtualFile) -> { if (element.isNumberLiteral()) { propertySetter.consume(object, (int)getNumber(element)); } }; }