org.geworkbench.bison.datastructure.properties
Class CSExtendable

java.lang.Object
  extended by org.geworkbench.bison.datastructure.properties.CSExtendable
All Implemented Interfaces:
java.io.Serializable, DSExtendable

public class CSExtendable
extends java.lang.Object
implements DSExtendable, java.io.Serializable

Copyright: Copyright (c) 2003

Company: First Genetic Trust Inc.

Baseline implementation of interface Extendable.

Version:
$Id: CSExtendable.java 7709 2011-04-07 19:16:31Z zji $
Author:
First Genetic Trust Inc.
See Also:
Serialized Form

Constructor Summary
CSExtendable()
           
 
Method Summary
 void addNameValuePair(java.lang.String name, java.lang.Object value)
          Adds a new name-value mapping.
 void allowMultipleValues(java.lang.String name)
          Conjugate method for forceUniqueValue.
 void clearName(java.lang.String name)
          Removes all values associated with the given name.
 void forceUniqueValue(java.lang.String name)
          Forces that the name be associated with at most one value.
 java.lang.Object[] getValuesForName(java.lang.String name)
          Returns all values mapped to the designated name.
 boolean isUniqueValue(java.lang.String name)
          Check if forceUniqueValue() is in effect for the designated name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSExtendable

public CSExtendable()
Method Detail

addNameValuePair

public void addNameValuePair(java.lang.String name,
                             java.lang.Object value)
Description copied from interface: DSExtendable
Adds a new name-value mapping.

Specified by:
addNameValuePair in interface DSExtendable

getValuesForName

public java.lang.Object[] getValuesForName(java.lang.String name)
Description copied from interface: DSExtendable
Returns all values mapped to the designated name.

Specified by:
getValuesForName in interface DSExtendable
Returns:
All values associated with the argument name.

forceUniqueValue

public void forceUniqueValue(java.lang.String name)
Description copied from interface: DSExtendable
Forces that the name be associated with at most one value. Attempting to add a name-value pair for a 'name' that already has an associate value, results in old name-value association be replaced by the new one.

Calling this method for an existing 'name' results in all the associated name-value pairs to be cleared.

Specified by:
forceUniqueValue in interface DSExtendable
Parameters:
name - The 'name' upon which uniqueness of value will be enforced.

allowMultipleValues

public void allowMultipleValues(java.lang.String name)
Description copied from interface: DSExtendable
Conjugate method for forceUniqueValue. Enables a 'name' to accept mulptiple name-value asscociations.

Specified by:
allowMultipleValues in interface DSExtendable
Parameters:
name - The 'name' for which multiplicity of value is enabled.

isUniqueValue

public boolean isUniqueValue(java.lang.String name)
Description copied from interface: DSExtendable
Check if forceUniqueValue() is in effect for the designated name.

Specified by:
isUniqueValue in interface DSExtendable
Returns:

clearName

public void clearName(java.lang.String name)
Description copied from interface: DSExtendable
Removes all values associated with the given name.

Specified by:
clearName in interface DSExtendable