byucc.edif
Class EdifNameSpaceMap

java.lang.Object
  extended by byucc.edif.AbstractEdifNameSpace
      extended by byucc.edif.EdifNameSpaceMap
All Implemented Interfaces:
EdifNameSpace, Trimable

public class EdifNameSpaceMap
extends AbstractEdifNameSpace
implements EdifNameSpace

Author:
wirthlin TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Field Summary
(package private)  java.util.HashMap _map
           
 
Constructor Summary
EdifNameSpaceMap()
           
EdifNameSpaceMap(int size)
           
 
Method Summary
protected  void addImplementation(Nameable n)
           
 boolean contains(Nameable n)
          Indicates whether the given NamedPropertyObject is a member of the name space.
 Nameable get(java.lang.String str)
          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
 void remove(Nameable n)
          Remove the given Nameable object from the name space.
 int size()
          Indicates the number of members of the name space
 void trimToSize()
          This method is used to trim the size of all "trimable" data structures within the Object.
 
Methods inherited from class byucc.edif.AbstractEdifNameSpace
add, addUniqueName, nameClash, nameClash, returnUniqueName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface byucc.edif.EdifNameSpace
add, addUniqueName, nameClash, nameClash
 

Field Detail

_map

java.util.HashMap _map
Constructor Detail

EdifNameSpaceMap

public EdifNameSpaceMap()

EdifNameSpaceMap

public EdifNameSpaceMap(int size)
Method Detail

iterator

public java.util.Iterator iterator()
Description copied from interface: EdifNameSpace
Returns an Iterator for all Nameable objects in the name space

Specified by:
iterator in interface EdifNameSpace
Returns:
Iterator over all Nameable objects in the name space.

get

public Nameable get(java.lang.String str)
Description copied from interface: EdifNameSpace
Returns the Nameable object associated with this name space that matches the given String name.

Specified by:
get in interface EdifNameSpace
Returns:
The Nameable object within this name space. This will return a null if an object of the given name does not exist.

addImplementation

protected void addImplementation(Nameable n)
Specified by:
addImplementation in class AbstractEdifNameSpace

contains

public boolean contains(Nameable n)
Description copied from interface: EdifNameSpace
Indicates whether the given NamedPropertyObject is a member of the name space. The search is performed using the name of the object.

Specified by:
contains in interface EdifNameSpace
Parameters:
n - 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

public int size()
Description copied from interface: EdifNameSpace
Indicates the number of members of the name space

Specified by:
size in interface EdifNameSpace
Returns:
The number of elements in the name space.

remove

public void remove(Nameable n)
Description copied from interface: EdifNameSpace
Remove the given Nameable object from the name space.

Specified by:
remove in interface EdifNameSpace

trimToSize

public void trimToSize()
Description copied from interface: Trimable
This method is used to trim the size of all "trimable" data structures within the Object. This method often involves the "trimToSize" method provided by many of the standard Java Collection data structures.

Specified by:
trimToSize in interface Trimable