Interface Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,​T>

    • Method Detail

      • toJson

        default J toJson​(Predicate<T> predicate)
        Returns this object as JsonValue. The content of the result is determined by the given predicate.
        Parameters:
        predicate - determines the content of the result.
        Returns:
        a JSON value representation of this object.
        Throws:
        NullPointerException - if predicate is null.
      • toJson

        J toJson​(JsonSchemaVersion schemaVersion,
                 Predicate<T> predicate)
        Returns this object as JsonValue. The content of the result is determined by the given predicate.
        Parameters:
        schemaVersion - the JsonSchemaVersion in which to return the JSON.
        predicate - determines the content of the result.
        Returns:
        a JSON value representation of this object.
        Throws:
        NullPointerException - if predicate is null.
      • toJsonString

        default String toJsonString​(Predicate<T> predicate)
        Returns a JSON string representation of this object. The content of the result is determined by the given predicate.
        Parameters:
        predicate - determines the content of the result.
        Returns:
        a JSON string representation of this object.
        Throws:
        NullPointerException - if predicate is null.
        See Also:
        toJson(Predicate)
      • toJsonString

        default String toJsonString​(JsonSchemaVersion schemaVersion,
                                    Predicate<T> predicate)
        Returns a JSON string representation of this object. The content of the result is determined by the given predicate.
        Parameters:
        schemaVersion - the JsonSchemaVersion in which to return the JSON.
        predicate - determines the content of the result.
        Returns:
        a JSON string representation of this object.
        Throws:
        NullPointerException - if predicate is null.
        See Also:
        toJson(JsonSchemaVersion, Predicate)