Package org.gcube.smartgears.context
Class Properties
java.lang.Object
org.gcube.smartgears.context.Properties
A collection of uniquely named
Propertys.- Author:
- Fabio Simeoni
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance.Properties(Properties parent) Creates an instance that delegates to another for unknown properties. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds one or more properties to this collection.booleanReturnstrueif this collection contains a given property.voidRemoves a given property.booleaninthashCode()booleanisEmpty()Returnstrueif this collection has no properties.iterator()Returns a given property in this collection.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Properties
Creates an instance that delegates to another for unknown properties.- Parameters:
parent- the parent instance
-
Properties
public Properties()Creates an instance.
-
-
Method Details
-
iterator
-
add
Adds one or more properties to this collection.- Parameters:
properties- the properties
-
contains
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
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
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
-
toString
-
hashCode
public int hashCode() -
equals
-