private static Optional < ICondition > asLessThan ( JsonObject json ) { return Optional . of ( json ) . filter ( j -> j . containsKey ( LESS_THAN_KEY ) ) . map ( j -> j . getJsonObject ( LESS_THAN_KEY ) ) . map ( a -> new AssertLess ( a . getString ( PROPERTY_KEY ) , a . getInt ( MAX_KEY ) ) ) ; }
Returns the AssertLess condition represented by the given JSON object or an empty value if no such condition is found .