Interface Attributes

  • All Superinterfaces:
    Iterable<org.eclipse.ditto.json.JsonField>, org.eclipse.ditto.model.base.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<org.eclipse.ditto.json.JsonField>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPointer<org.eclipse.ditto.json.JsonObject>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,​org.eclipse.ditto.json.JsonField>, org.eclipse.ditto.json.JsonObject, org.eclipse.ditto.json.JsonValue, org.eclipse.ditto.json.JsonValueContainer<org.eclipse.ditto.json.JsonField>

    @Immutable
    public interface Attributes
    extends org.eclipse.ditto.json.JsonObject, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<org.eclipse.ditto.json.JsonField>
    Attributes describe other entities (e. g. a Thing) in more detail and can be of any type. Attributes can also be used to find entities. Attributes are typically used to model rather static properties of an entity. Static means that the values do not change as frequently as property values of Features for example.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable

        org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<T extends Object>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,​T extends Object>
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      static AttributesBuilder newBuilder()
      Returns a new empty builder for a Attributes.
      Attributes remove​(CharSequence key)  
      Attributes set​(org.eclipse.ditto.json.JsonField field)  
      Attributes setAll​(Iterable<org.eclipse.ditto.json.JsonField> jsonFields)  
      Attributes setValue​(CharSequence key, boolean value)  
      Attributes setValue​(CharSequence key, double value)  
      Attributes setValue​(CharSequence key, int value)  
      Attributes setValue​(CharSequence key, long value)  
      Attributes setValue​(CharSequence key, String value)  
      Attributes setValue​(CharSequence key, org.eclipse.ditto.json.JsonValue value)  
      default AttributesBuilder toBuilder()
      Returns a mutable builder with a fluent API for immutable Attributes.
      default org.eclipse.ditto.json.JsonObject toJson​(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion, org.eclipse.ditto.json.JsonFieldSelector fieldSelector)  
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable

        getImplementedSchemaVersion, getLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJson, toJsonString
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector

        toJson, toJson, toJson, toJsonString, toJsonString
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate

        toJson, toJson, toJsonString, toJsonString
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable.WithPointer

        toJsonString, toJsonString
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate

        toJson, toJson, toJsonString, toJsonString
      • Methods inherited from interface org.eclipse.ditto.json.JsonObject

        contains, get, get, get, getField, getKeys, getValue, getValue, getValueOrThrow, set
      • Methods inherited from interface org.eclipse.ditto.json.JsonValue

        asArray, asBoolean, asDouble, asInt, asLong, asObject, asString, formatAsString, getUpperBoundForStringSize, isArray, isBoolean, isDouble, isInt, isLong, isNull, isNumber, isObject, isString, toString, writeValue
      • Methods inherited from interface org.eclipse.ditto.json.JsonValueContainer

        getSize, isEmpty, stream
    • Method Detail

      • newBuilder

        static AttributesBuilder newBuilder()
        Returns a new empty builder for a Attributes.
        Returns:
        the builder.
      • toBuilder

        default AttributesBuilder toBuilder()
        Returns a mutable builder with a fluent API for immutable Attributes. The builder is initialised with the entries of this instance.
        Specified by:
        toBuilder in interface org.eclipse.ditto.json.JsonObject
        Returns:
        the new builder.
      • setValue

        Attributes setValue​(CharSequence key,
                            int value)
        Specified by:
        setValue in interface org.eclipse.ditto.json.JsonObject
      • setValue

        Attributes setValue​(CharSequence key,
                            long value)
        Specified by:
        setValue in interface org.eclipse.ditto.json.JsonObject
      • setValue

        Attributes setValue​(CharSequence key,
                            double value)
        Specified by:
        setValue in interface org.eclipse.ditto.json.JsonObject
      • setValue

        Attributes setValue​(CharSequence key,
                            boolean value)
        Specified by:
        setValue in interface org.eclipse.ditto.json.JsonObject
      • setValue

        Attributes setValue​(CharSequence key,
                            String value)
        Specified by:
        setValue in interface org.eclipse.ditto.json.JsonObject
      • setValue

        Attributes setValue​(CharSequence key,
                            org.eclipse.ditto.json.JsonValue value)
        Specified by:
        setValue in interface org.eclipse.ditto.json.JsonObject
      • set

        Attributes set​(org.eclipse.ditto.json.JsonField field)
        Specified by:
        set in interface org.eclipse.ditto.json.JsonObject
      • setAll

        Attributes setAll​(Iterable<org.eclipse.ditto.json.JsonField> jsonFields)
        Specified by:
        setAll in interface org.eclipse.ditto.json.JsonObject
      • remove

        Attributes remove​(CharSequence key)
        Specified by:
        remove in interface org.eclipse.ditto.json.JsonObject
      • toJson

        default org.eclipse.ditto.json.JsonObject toJson​(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
                                                         org.eclipse.ditto.json.JsonFieldSelector fieldSelector)
        Specified by:
        toJson in interface org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector