byucc.jhdl.base
Class PropertyList

java.lang.Object
  extended bybyucc.jhdl.base.list.VectorList
      extended bybyucc.jhdl.base.PropertyList
All Implemented Interfaces:
List

public class PropertyList
extends VectorList

This class stores a list of properties that correspond to a Cell or Wire.

Author:
Eric Blake

Constructor Summary
PropertyList()
           
 
Method Summary
 boolean contains(java.lang.String name)
          Returns true if the list contains a property with the given name.
 Property get(java.lang.String name)
          Returns the Property corresponding to name in the list.
 Property getProperty()
          Returns the property at the current list position
 void merge(PropertyList pl)
          This merges two property lists, with the special case that two properties with the same name, type, and value show up only once in the final list, but two properties with the same name but differing types or values throws an exception.
 void putProperty(Property p)
          Inserts a property into the list, if it is not already in the list.
 boolean remove(java.lang.String name)
          Deletes the property for the given name, if it exists, otherwise does nothing.
 boolean removeProperty(Property p)
          Removes the property if it exists, otherwise does nothing.
 
Methods inherited from class byucc.jhdl.base.list.VectorList
append, appendList, atEnd, delete, deleteAll, deleteCurrent, elementCount, empty, filter, getElt, init, inList, insert, insertAfterCurrent, insertBeforeCurrent, insertList, intersect, iterator, merge, next, prev, size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyList

public PropertyList()
Method Detail

getProperty

public final Property getProperty()
Returns the property at the current list position

Returns:
the current Property

putProperty

public void putProperty(Property p)
Inserts a property into the list, if it is not already in the list.

Parameters:
p - the Property to insert
Throws:
BuildException - if there is already a property by that name on the list

removeProperty

public boolean removeProperty(Property p)
Removes the property if it exists, otherwise does nothing.

Parameters:
p - the property to remove
Returns:
true if the property was found and deleted, false if not found

get

public final Property get(java.lang.String name)
Returns the Property corresponding to name in the list.

Parameters:
name - the name to get from the list
Returns:
the Property containing that name, or null if none exists

contains

public final boolean contains(java.lang.String name)
Returns true if the list contains a property with the given name.

Parameters:
name - the name to search for
Returns:
true if the list contains a property by that name

remove

public final boolean remove(java.lang.String name)
Deletes the property for the given name, if it exists, otherwise does nothing.

Parameters:
name - the name to delete
Returns:
true if a delete occurred, false if nothing happened

merge

public void merge(PropertyList pl)
This merges two property lists, with the special case that two properties with the same name, type, and value show up only once in the final list, but two properties with the same name but differing types or values throws an exception. The instance that calls this is modified to include the elements of the argument list.

Parameters:
pl - the list to merge into the existing list
Throws:
BuildException - if two properties clash


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.