Class PortsAttribute

All Implemented Interfaces:
Comparable<Object>, Attribute, CollectionAttribute, DeepCopy, GraphicAttributeConstants, Displayable

public class PortsAttribute
extends HashMapAttribute
implements GraphicAttributeConstants
Contains ingoing, outgoing and common ports
Version:
$Revision: 1.8 $
Author:
breu
  • Constructor Details

    • PortsAttribute

      public PortsAttribute​(String id)
      Constructor for Ports.
      Parameters:
      id - the id of the attribute.
    • PortsAttribute

      public PortsAttribute​(String id, CollectionAttribute i, CollectionAttribute o, CollectionAttribute c)
      Constructor for Ports.
      Parameters:
      id - the id of the attribute.
      i - the ingoing-value of the attribute.
      o - the outgoing-value of the attribute.
      c - the common-value of the attribute.
  • Method Details

    • setCollection

      public void setCollection​(Map<String,​Attribute> attrs)
      Sets the collection of attributes contained within this CollectionAttribute
      Specified by:
      setCollection in interface CollectionAttribute
      Overrides:
      setCollection in class HashMapAttribute
      Parameters:
      attrs - the map that contains all attributes.
      Throws:
      IllegalArgumentException - DOCUMENT ME!
    • setCommon

      public void setCommon​(CollectionAttribute c)
      Sets the 'common'-value.
      Parameters:
      c - the 'common'-value to be set.
    • getCommon

      public CollectionAttribute getCommon()
      Returns the 'common'-value of the encapsulated ports.
      Returns:
      the 'common'-value of the encapsulated ports.
    • setCommonPorts

      public void setCommonPorts​(List ports)
      DOCUMENT ME!
      Parameters:
      ports - DOCUMENT ME!
    • setIngoing

      public void setIngoing​(CollectionAttribute i)
      Sets the 'ingoing'-value.
      Parameters:
      i - the 'ingoing'-value to be set.
    • getIngoing

      public CollectionAttribute getIngoing()
      Returns the 'ingoing'-value of the encapsulated ports.
      Returns:
      the 'ingoing'-value of the encapsulated ports.
    • setOutgoing

      public void setOutgoing​(CollectionAttribute o)
      Sets the 'outgoing'-value.
      Parameters:
      o - the 'outgoing'-value to be set.
    • getOutgoing

      public CollectionAttribute getOutgoing()
      Returns the 'outgoing'-value of the encapsulated ports.
      Returns:
      the 'outgoing'-value of the encapsulated ports.
    • getPort

      public PortAttribute getPort​(String name, boolean out)
      Look if there is a PortAttribute in this CollectionAttribute called name. Returns null if there is no such attribute.
      Parameters:
      name - the name of the port attribute wanted.
      out - DOCUMENT ME!
      Returns:
      the PortAttribute named name or null if no such attribute exists.
    • copy

      public Object copy()
      Returns a deep copy of this object.
      Specified by:
      copy in interface DeepCopy
      Overrides:
      copy in class HashMapAttribute
      Returns:
      A deep copy of this object.