Package org.gcube.smartgears.context
Class Properties
- java.lang.Object
-
- org.gcube.smartgears.context.Properties
-
-
Constructor Summary
Constructors Constructor Description Properties()Creates an instance.Properties(Properties parent)Creates an instance that delegates to another for unknown properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Property... properties)Adds one or more properties to this collection.booleancontains(String name)Returnstrueif this collection contains a given property.voiddelete(String name)Removes a given property.booleanequals(Object obj)inthashCode()booleanisEmpty()Returnstrueif this collection has no properties.Iterator<Property>iterator()Propertylookup(String name)Returns a given property in this collection.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
Properties
public Properties(Properties parent)
Creates an instance that delegates to another for unknown properties.- Parameters:
parent- the parent instance
-
Properties
public Properties()
Creates an instance.
-
-
Method Detail
-
add
public void add(Property... properties)
Adds one or more properties to this collection.- Parameters:
properties- the properties
-
contains
public boolean contains(String name)
Returnstrueif this collection contains a given property.- Parameters:
name- the name of the property- Returns:
trueif this collection contains a property with the given name
-
delete
public void delete(String name)
Removes a given property.- Parameters:
name- the name of the property- Throws:
IllegalStateException- if a property with the given name does not exist in this collection
-
lookup
public Property lookup(String name)
Returns a given property in this collection.- Parameters:
name- the name of the property- Returns:
- the property
- Throws:
IllegalStateException- if a property with a given name does not exist in this collection
-
isEmpty
public boolean isEmpty()
Returnstrueif this collection has no properties.- Returns:
trueif this collection has no properties
-
-