Package eu.mihosoft.vrl.v3d
Class PropertyStorage
java.lang.Object
eu.mihosoft.vrl.v3d.PropertyStorage
A simple property storage.
- Author:
- Michael Hoffer <info@michaelhoffer.de>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether this storage contains the requested property.void
Deletes the requested property if present.<T> Optional<T>
Returns a property.void
Sets a property.
-
Constructor Details
-
PropertyStorage
public PropertyStorage()Constructor. Creates a new property storage.
-
-
Method Details
-
set
Sets a property. Existing properties are overwritten.- Parameters:
key
- keyproperty
- property
-
getValue
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
Deletes the requested property if present. Does nothing otherwise.- Parameters:
key
- key
-
contains
Indicates whether this storage contains the requested property.- Parameters:
key
- key- Returns:
true
if this storage contains the requested property;false
-