Class PropertyStorage

java.lang.Object
eu.mihosoft.vrl.v3d.PropertyStorage

public class PropertyStorage extends Object
A simple property storage.
Author:
Michael Hoffer <info@michaelhoffer.de>
  • Constructor Details Link icon

    • PropertyStorage Link icon

      public PropertyStorage()
      Constructor. Creates a new property storage.
  • Method Details Link icon

    • set Link icon

      public void set(String key, Object property)
      Sets a property. Existing properties are overwritten.
      Parameters:
      key - key
      property - property
    • getValue Link icon

      public <T> Optional<T> getValue(String key)
      Returns a property.
      Type Parameters:
      T - property type
      Parameters:
      key - key
      Returns:
      the property; an empty Optional will be returned if the property does not exist or the type does not match
    • delete Link icon

      public void delete(String key)
      Deletes the requested property if present. Does nothing otherwise.
      Parameters:
      key - key
    • contains Link icon

      public boolean contains(String key)
      Indicates whether this storage contains the requested property.
      Parameters:
      key - key
      Returns:
      true if this storage contains the requested property; false