Skip navigation links
oracle.wcps.property.model
Class PropertySet
java.lang.Object
oracle.wcps.property.model.Timestamped
oracle.wcps.property.model.AbstractMap<IPropertyName,Property<java.io.Serializable>>
oracle.wcps.property.model.PropertySet
- All Implemented Interfaces:
- java.io.Serializable, java.util.Map<java.lang.String,java.io.Serializable>, IPropertySet, ITimestamped
-
public class PropertySet
- extends AbstractMap<IPropertyName,Property<java.io.Serializable>>
- implements IPropertySet, java.io.Serializable
An implementation of IPropertySet
. Use the builder builder()
to create an instance of this.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Methods inherited from class oracle.wcps.property.model.AbstractMap |
clear, containsKey, containsValue, entrySet, get, get, getDescription, getNamespaceName, getPropertySetDefinitionName, isEmpty, keySet, put, putAll, remove, setDescription, setNamespaceName, setPropertySetDefinitionName, size, values |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, remove, size, values |
name
public java.lang.String name()
- Description copied from interface:
IPropertySet
- Returns the string representation of the composite name of this. It is created by combining "[string representation of the namespace name of this]: [string representation of the propertysetdefinition name of this]:[string representation of the name of this]".
-
- Specified by:
name
in interface IPropertySet
- Specified by:
name
in class AbstractMap<IPropertyName,Property<java.io.Serializable>>
-
- Returns:
- the string representation of the composite name.
getName
public IPropertySetName getName()
- Description copied from interface:
IPropertySet
- Returns the propertyset name of this.
-
- Specified by:
getName
in interface IPropertySet
-
- Returns:
- the propertyset name of this.
setName
public void setName(IPropertySetName setName)
- Description copied from interface:
IPropertySet
- Sets the given
propertySetName
as the name of this.
-
- Specified by:
setName
in interface IPropertySet
-
- Parameters:
setName
- a name for this.
getProperties
public java.util.List<IProperty<java.io.Serializable>> getProperties()
- Description copied from interface:
IPropertySet
- Returns the list of properties of this propertyset.
-
- Specified by:
getProperties
in interface IPropertySet
-
- Returns:
- a list of properties.
put
public java.io.Serializable put(java.lang.String key,
java.io.Serializable value)
-
- Specified by:
put
in interface java.util.Map<java.lang.String,java.io.Serializable>
- Specified by:
put
in class AbstractMap<IPropertyName,Property<java.io.Serializable>>
get
public <T extends java.io.Serializable> T get(IPropertyName name,
java.lang.Class<T> c)
- Description copied from interface:
IPropertySet
- Returns the value (casted to the given class c) associated with the given property name if mapped or
null
if this propertyset contains no mapping for the given property name
.
-
- Specified by:
get
in interface IPropertySet
-
- Type Parameters:
T
- type of a class.
- Parameters:
name
- a property name.
c
- the class to which the value is casted to.
- Returns:
- the mapped value if found otherwise null.
put
public <T extends java.io.Serializable> T put(IPropertyName key,
T value,
java.lang.Class<T> c)
- Description copied from interface:
IPropertySet
- Same as
IPropertySet.put(IPropertyName, java.io.Serializable)
except it returns previously mapped value as a type of the given class c.
-
- Specified by:
put
in interface IPropertySet
-
- Type Parameters:
T
- type of a class.
- Parameters:
key
- property name with which the specified value is to be associated.
value
- value to be associated with specified key.
c
- the class to which the previously mapped value is casted to.
- Returns:
- the previous value associated with the key, or null if there was no mapping for key.
putProperty
public <T extends java.io.Serializable> IProperty<T> putProperty(IPropertyName key,
IProperty<T> value)
- Description copied from interface:
IPropertySet
- Associates the specified value with the given property name.
-
- Specified by:
putProperty
in interface IPropertySet
-
- Type Parameters:
T
- type for the value
- Parameters:
key
- a property name.
value
- the property to be associated with the given property name.
- Returns:
- the property if mapped previously otherwise null.
getProperty
public <T extends java.io.Serializable> IProperty<T> getProperty(IPropertyName name)
- Description copied from interface:
IPropertySet
- Returns the property with the given name if found otherwise null.
-
- Specified by:
getProperty
in interface IPropertySet
-
- Type Parameters:
T
- the property value's type.
- Parameters:
name
- a property's name
- Returns:
- the property with the given name if found in this propertyset, otherwise null.
removeProperty
public <T extends java.io.Serializable> IProperty<T> removeProperty(IPropertyName name)
- Description copied from interface:
IPropertySet
- Removes the property associated with the given property name.
-
- Specified by:
removeProperty
in interface IPropertySet
-
- Type Parameters:
T
- the property value's type.
- Parameters:
name
- a property name
- Returns:
- the removed property if the given name previously mapped otherwise null
iterate
public void iterate(IPredicate<IProperty> predicate)
- Description copied from interface:
IPropertySet
- Calls the given predicates
IPredicate.apply(Object)
method for each property found in this propertyset.
-
- Specified by:
iterate
in interface IPropertySet
-
- Parameters:
predicate
- a predicate object.
containsKey
public boolean containsKey(IPropertyName key)
- Description copied from interface:
IPropertySet
- Returns true if this propertyset contains a mapping for the specified property name key.
-
- Specified by:
containsKey
in interface IPropertySet
-
- Parameters:
key
- proeprty name whose presence in this propertyset is to be tested.
- Returns:
- true if this propertyset contains a mapping for the specified property name key
equals
public boolean equals(java.lang.Object o)
-
- Specified by:
equals
in interface java.util.Map<java.lang.String,java.io.Serializable>
- Overrides:
equals
in class AbstractMap<IPropertyName,Property<java.io.Serializable>>
hashCode
public int hashCode()
-
- Specified by:
hashCode
in interface java.util.Map<java.lang.String,java.io.Serializable>
- Overrides:
hashCode
in class AbstractMap<IPropertyName,Property<java.io.Serializable>>
toString
public java.lang.String toString()
-
- Overrides:
toString
in class java.lang.Object
getRPropertySet
public java.lang.Object getRPropertySet()
setRPropertySet
public void setRPropertySet(RPropertySet rSet)
builder
public static PropertySet.Builder builder()
- Returns an instance of Builder to create a PropertySet.
-
- Returns:
- an instance of Builder
createKey
protected IPropertyName createKey(java.lang.Object o)
-
- Specified by:
createKey
in class AbstractMap<IPropertyName,Property<java.io.Serializable>>
createValue
protected Property<java.io.Serializable> createValue(java.lang.String k,
java.io.Serializable v)
-
- Specified by:
createValue
in class AbstractMap<IPropertyName,Property<java.io.Serializable>>
getKey
protected IPropertyName getKey(Property<java.io.Serializable> serializableIProperty)
-
- Specified by:
getKey
in class AbstractMap<IPropertyName,Property<java.io.Serializable>>
setNewValue
protected void setNewValue(Property<java.io.Serializable> serializableIProperty,
java.io.Serializable newValue)
-
- Specified by:
setNewValue
in class AbstractMap<IPropertyName,Property<java.io.Serializable>>
Skip navigation links
Copyright © 2009, 2014, Oracle and/or its affiliates. All rights reserved.