org.gcube.common.ghn.service.context
Class Properties

java.lang.Object
  extended by org.gcube.common.ghn.service.context.Properties
All Implemented Interfaces:
Iterable<Property>

public class Properties
extends Object
implements Iterable<Property>

A collection of uniquely named Properties.

Author:
Fabio Simeoni

Constructor Summary
Properties()
           
Properties(Properties parent)
           
 
Method Summary
 void add(Property... properties)
          Adds one or more properties to this collection.
 boolean contains(String name)
          Returns true if this collection contains a given property.
 void delete(String name)
          Removes a given property.
 boolean equals(Object obj)
           
 int hashCode()
           
 boolean isEmpty()
          Returns true if this collection has no properties.
 Iterator<Property> iterator()
           
 Property lookup(String name)
          Returns a given property in this collection.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Properties

public Properties(Properties parent)

Properties

public Properties()
Method Detail

iterator

public Iterator<Property> iterator()
Specified by:
iterator in interface Iterable<Property>

add

public void add(Property... properties)
Adds one or more properties to this collection.

Parameters:
properties - the properties

contains

public boolean contains(String name)
Returns true if this collection contains a given property.

Parameters:
name - the name of the property
Returns:
true if 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()
Returns true if this collection has no properties.

Returns:
true if this collection has no properties

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2013. All Rights Reserved.