byucc.edif
Interface EdifNameSpace

All Superinterfaces:
Trimable
All Known Implementing Classes:
AbstractEdifNameSpace, EdifNameSpaceList, EdifNameSpaceMap

public interface EdifNameSpace
extends Trimable

A group of Nameable objects each with a unique String name. The group specifies a name space of unique names for EdifNameable objects. Each name in the space is unique and methods are provided for creating and checking for uniqueness. Each unique name is associated with a EdifNameable object.

Author:
Mike Wirthlin\ $Id: EdifNameSpace.java,v 1.1 2005/08/09 17:23:37 wirthlin Exp $

Method Summary
 void add(Nameable e)
          Adds a EdifNameable object to the Collection.
 java.lang.String addUniqueName(NamedPropertyObject e)
          Adds a EdifNameable object to the Collection.
 boolean contains(Nameable e)
          Indicates whether the given NamedPropertyObject is a member of the name space.
 Nameable get(java.lang.String name)
          Returns the Nameable object associated with this name space that matches the given String name.
 java.util.Iterator iterator()
          Returns an Iterator for all Nameable objects in the name space
 boolean nameClash(Nameable e)
          Determines if the given named object will clash with the names in this given EdifNameSpace.
 boolean nameClash(java.lang.String e)
          Indicates that there is a name clash within this Collection.
 void remove(Nameable e)
          Remove the given Nameable object from the name space.
 int size()
          Indicates the number of members of the name space
 
Methods inherited from interface byucc.edif.Trimable
trimToSize
 

Method Detail

nameClash

boolean nameClash(Nameable e)
Determines if the given named object will clash with the names in this given EdifNameSpace.

Parameters:
e - The EdifNameable object that is to be compared against the name space
Returns:
true if there is a clash, false if there is no clash.

nameClash

boolean nameClash(java.lang.String e)
Indicates that there is a name clash within this Collection.

Parameters:
e - The String object that is to be compared against the collection. Note that this method will perform the check using case insensitivity.
Returns:
true if there is a clash, false if there is no clash.

add

void add(Nameable e)
         throws EdifNameConflictException
Adds a EdifNameable object to the Collection. This method will check to see if there is a conflict and throw an exception if there is a conflict.

Parameters:
e - Add the named object to the name space. The name of the object is associated with name of the NamedPropertyObject.
Throws:
EdifNameConflictException - This exception is thrown when a name conflict occurs during the add.

addUniqueName

java.lang.String addUniqueName(NamedPropertyObject e)
Adds a EdifNameable object to the Collection. This method will check to see if there is a conflict. If there is a conflict, this method will change the name of the EdifNameable object and add it to the Collection.

Parameters:
e - Add the named object to the name space. The name of the object is associated with name of the NamedPropertyObject.
Returns:
Returns a String specifying the unique name. If the name is not changed, the original name is returned. If the name is changed, the new name is returned.

contains

boolean contains(Nameable e)
Indicates whether the given NamedPropertyObject is a member of the name space. The search is performed using the name of the object.

Parameters:
e - The NamedPropertyObject to search for in the name space.
Returns:
true if the object is a member of the space. false if it is not a member of the space.

size

int size()
Indicates the number of members of the name space

Returns:
The number of elements in the name space.

get

Nameable get(java.lang.String name)
Returns the Nameable object associated with this name space that matches the given String name.

Parameters:
name -
Returns:
The Nameable object within this name space. This will return a null if an object of the given name does not exist.

iterator

java.util.Iterator iterator()
Returns an Iterator for all Nameable objects in the name space

Returns:
Iterator over all Nameable objects in the name space.

remove

void remove(Nameable e)
Remove the given Nameable object from the name space.

Parameters:
e -