org.expasy.jpl.commons.base
Class GenericProperties<T>

java.lang.Object
  extended by org.expasy.jpl.commons.base.GenericProperties<T>
Type Parameters:
T - the values type.

public final class GenericProperties<T>
extends Object

A simple generic properties object.

Version:
1.0
Author:
nikitin

Method Summary
 void addProperty(String name, T value)
          Add a new property with a name and a value.
 T getProperty(String name)
           
 Set<String> getPropertyNames()
           
 boolean hasProperty(String name)
           
static
<T> GenericProperties<T>
newInstance()
          the static factory method to get a new instance
 int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

newInstance

public static <T> GenericProperties<T> newInstance()
the static factory method to get a new instance


addProperty

public void addProperty(String name,
                        T value)
Add a new property with a name and a value.

Parameters:
name - the property name.
value - the property value.

hasProperty

public final boolean hasProperty(String name)
Returns:
true if has property name.

getProperty

public final T getProperty(String name)
Parameters:
name - the property name.
Returns:
the value of the property.

size

public final int size()
Returns:
the number of property.

getPropertyNames

public final Set<String> getPropertyNames()
Returns:
set of property names.

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2012 Swiss Institute of Bioinformatics. All rights reserved.