code: private static ICondition asCondition( JsonObject json)
      {
      List<Function<JsonObject,Optional<ICondition>>> converters = Arrays.asList
        (
          SystemInputJson::asContainsAll,
          SystemInputJson::asContainsAny,
          SystemInputJson::asContainsNone,
          SystemInputJson::asNot,
          SystemInputJson::asAnyOf,
          SystemInputJson::asAllOf,
          SystemInputJson::asLessThan,
          SystemInputJson::asMoreThan,
          SystemInputJson::asNotLessThan,
          SystemInputJson::asNotMoreThan,
          SystemInputJson::asBetween,
          SystemInputJson::asEquals
         );
  
      return
        converters.stream()
        .map( converter -> converter.apply( json))
        .filter( Optional::isPresent)
        .map( Optional::get)
        .findFirst()
        .orElseThrow( () -> new SystemInputException( String.format( "Unknown condition type: %s", json.keySet().iterator().next())))
        ;
      }
docs: Returns the condition definition represented by the given JSON object.