edu.nyu.cs.pdsg.drbac
Class AttributeSet

java.lang.Object
  extended byedu.nyu.cs.pdsg.drbac.AttributeSet
All Implemented Interfaces:
java.io.Serializable

public class AttributeSet
extends java.lang.Object
implements java.io.Serializable

A convenient storage system for a set of attributes, containing several operators used to accumulate values as paths are traversed

See Also:
Serialized Form

Field Summary
protected  java.util.HashMap bindings
           
 
Constructor Summary
AttributeSet()
          Initialize an empty AttributeSet
AttributeSet(java.util.HashMap _bindings)
          Initialize an AttributeSet containing an existing set of bindings
 
Method Summary
 void add(Attribute attribute)
          Add an attribute to this set
 void apply(AttributeSet other)
          Combine an attribute set into this one.
 java.util.Collection attributes()
           
 AttributeSet badcompose(AttributeSet other)
           
 AttributeSet compose(AttributeSet other)
          Combine two attribute sets into one.
 AttributeSet copy()
          Needed to insure that compose() functions correctly
 java.lang.Object get(Role attributeID)
          Get the value of the attribute with the given role
 boolean satisfies(AttributeSet constraintSet)
          Checks to see if this set satisfies the constraints set by another set
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bindings

protected java.util.HashMap bindings
Constructor Detail

AttributeSet

public AttributeSet()
Initialize an empty AttributeSet


AttributeSet

public AttributeSet(java.util.HashMap _bindings)
Initialize an AttributeSet containing an existing set of bindings

Parameters:
_bindings - The bindings of another AttributeSet, or null to create an empty set
Method Detail

copy

public AttributeSet copy()
Needed to insure that compose() functions correctly


attributes

public java.util.Collection attributes()
Returns:
The attributes contained within

add

public void add(Attribute attribute)
Add an attribute to this set

Parameters:
attribute - the attribute to add

get

public java.lang.Object get(Role attributeID)
Get the value of the attribute with the given role

Parameters:
attributeID - the attribute to get
Returns:
the value of the attribute

badcompose

public AttributeSet badcompose(AttributeSet other)

compose

public AttributeSet compose(AttributeSet other)
Combine two attribute sets into one. Does not modify either.

Parameters:
other - the attribute set to merge
Returns:
the set of combined attributes

apply

public void apply(AttributeSet other)
Combine an attribute set into this one. Modifies this set

Parameters:
other - the attribute set to merge with

satisfies

public boolean satisfies(AttributeSet constraintSet)
Checks to see if this set satisfies the constraints set by another set

Parameters:
constraintSet - the set of constraints that this set is to be compared against
Returns:
true if this set satisfies the given constraints

toString

public java.lang.String toString()
Returns:
a human readable representation of the attributes in this set


Copyright (c) 2002-2003 New York University RLAB