Class Properties

java.lang.Object
org.camunda.bpm.engine.impl.core.model.Properties

public class Properties extends Object
Properties that maps property keys to values. The properties cannot contain duplicate property names; each property name can map to at most one value.
Author:
Philipp Ossler
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Map<String,Object>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Properties(Map<String,Object> properties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> void
    addListItem(PropertyListKey<T> property, T value)
    Append the value to the list to which the specified property key is mapped.
    boolean
    contains(PropertyKey<?> property)
    Returns true if this properties contains a mapping for the specified property key.
    boolean
    Returns true if this properties contains a mapping for the specified property key.
    boolean
    contains(PropertyMapKey<?,?> property)
    Returns true if this properties contains a mapping for the specified property key.
    <T> T
    get(PropertyKey<T> property)
    Returns the value to which the specified property key is mapped, or null if this properties contains no mapping for the property key.
    <T> List<T>
    get(PropertyListKey<T> property)
    Returns the list to which the specified property key is mapped, or an empty list if this properties contains no mapping for the property key.
    <K, V> Map<K,V>
    get(PropertyMapKey<K,V> property)
    Returns the map to which the specified property key is mapped, or an empty map if this properties contains no mapping for the property key.
    <K, V> void
    putMapEntry(PropertyMapKey<K,V> property, K key, V value)
    Insert the value to the map to which the specified property key is mapped.
    <T> void
    set(PropertyKey<T> property, T value)
    Associates the specified value with the specified property key.
    <T> void
    set(PropertyListKey<T> property, List<T> value)
    Associates the specified list with the specified property key.
    <K, V> void
    set(PropertyMapKey<K,V> property, Map<K,V> value)
    Associates the specified map with the specified property key.
    Returns a map view of this properties.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • Properties

      public Properties()
    • Properties

      public Properties(Map<String,Object> properties)
  • Method Details

    • get

      public <T> T get(PropertyKey<T> property)
      Returns the value to which the specified property key is mapped, or null if this properties contains no mapping for the property key.
      Parameters:
      property - the property key whose associated value is to be returned
      Returns:
      the value to which the specified property key is mapped, or null if this properties contains no mapping for the property key
    • get

      public <T> List<T> get(PropertyListKey<T> property)
      Returns the list to which the specified property key is mapped, or an empty list if this properties contains no mapping for the property key. Note that the empty list is not mapped to the property key.
      Parameters:
      property - the property key whose associated list is to be returned
      Returns:
      the list to which the specified property key is mapped, or an empty list if this properties contains no mapping for the property key
      See Also:
    • get

      public <K, V> Map<K,V> get(PropertyMapKey<K,V> property)
      Returns the map to which the specified property key is mapped, or an empty map if this properties contains no mapping for the property key. Note that the empty map is not mapped to the property key.
      Parameters:
      property - the property key whose associated map is to be returned
      Returns:
      the map to which the specified property key is mapped, or an empty map if this properties contains no mapping for the property key
      See Also:
    • set

      public <T> void set(PropertyKey<T> property, T value)
      Associates the specified value with the specified property key. If the properties previously contained a mapping for the property key, the old value is replaced by the specified value.
      Type Parameters:
      T - the type of the value
      Parameters:
      property - the property key with which the specified value is to be associated
      value - the value to be associated with the specified property key
    • set

      public <T> void set(PropertyListKey<T> property, List<T> value)
      Associates the specified list with the specified property key. If the properties previously contained a mapping for the property key, the old value is replaced by the specified list.
      Type Parameters:
      T - the type of elements in the list
      Parameters:
      property - the property key with which the specified list is to be associated
      value - the list to be associated with the specified property key
    • set

      public <K, V> void set(PropertyMapKey<K,V> property, Map<K,V> value)
      Associates the specified map with the specified property key. If the properties previously contained a mapping for the property key, the old value is replaced by the specified map.
      Type Parameters:
      K - the type of keys maintained by the map
      V - the type of mapped values
      Parameters:
      property - the property key with which the specified map is to be associated
      value - the map to be associated with the specified property key
    • addListItem

      public <T> void addListItem(PropertyListKey<T> property, T value)
      Append the value to the list to which the specified property key is mapped. If this properties contains no mapping for the property key, the value append to a new list witch is associate the the specified property key.
      Type Parameters:
      T - the type of elements in the list
      Parameters:
      property - the property key whose associated list is to be added
      value - the value to be appended to list
    • putMapEntry

      public <K, V> void putMapEntry(PropertyMapKey<K,V> property, K key, V value)
      Insert the value to the map to which the specified property key is mapped. If this properties contains no mapping for the property key, the value insert to a new map witch is associate the the specified property key.
      Type Parameters:
      K - the type of keys maintained by the map
      V - the type of mapped values
      Parameters:
      property - the property key whose associated list is to be added
      value - the value to be appended to list
    • contains

      public boolean contains(PropertyKey<?> property)
      Returns true if this properties contains a mapping for the specified property key.
      Parameters:
      property - the property key whose presence is to be tested
      Returns:
      true if this properties contains a mapping for the specified property key
    • contains

      public boolean contains(PropertyListKey<?> property)
      Returns true if this properties contains a mapping for the specified property key.
      Parameters:
      property - the property key whose presence is to be tested
      Returns:
      true if this properties contains a mapping for the specified property key
    • contains

      public boolean contains(PropertyMapKey<?,?> property)
      Returns true if this properties contains a mapping for the specified property key.
      Parameters:
      property - the property key whose presence is to be tested
      Returns:
      true if this properties contains a mapping for the specified property key
    • toMap

      public Map<String,Object> toMap()
      Returns a map view of this properties. Changes to the map are not reflected to the properties.
      Returns:
      a map view of this properties
    • toString

      public String toString()
      Overrides:
      toString in class Object