issrg.pba.rbac.policies
Class IntersectionSubtree

java.lang.Object
  extended by issrg.pba.rbac.policies.IntersectionSubtree
All Implemented Interfaces:
Subtree

public class IntersectionSubtree
extends java.lang.Object
implements Subtree

This class is an intersection of two subtrees. An entry is contained in the IntersectionSubtree, if it is contained in all the subtrees that it is an intersection of.


Field Summary
protected  Subtree tree1
           
protected  Subtree tree2
           
 
Constructor Summary
protected IntersectionSubtree()
           
  IntersectionSubtree(Subtree t1, Subtree t2)
          This constructor builds an IntersectionSubtree, given two Subtrees.
 
Method Summary
 boolean contains(Entry e)
          This method tells whether the given Entry is contained in the Intersection of the two Subtrees passed to the constructor.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tree1

protected Subtree tree1

tree2

protected Subtree tree2
Constructor Detail

IntersectionSubtree

protected IntersectionSubtree()

IntersectionSubtree

public IntersectionSubtree(Subtree t1,
                           Subtree t2)
This constructor builds an IntersectionSubtree, given two Subtrees. Both of the subtrees are treated equally.

Parameters:
t1 - - one Subtree
t2 - - another Subtree
Method Detail

contains

public boolean contains(Entry e)
This method tells whether the given Entry is contained in the Intersection of the two Subtrees passed to the constructor.

Specified by:
contains in interface Subtree
Parameters:
e - - the Entry to test
Returns:
true, if and only if the Entry is contained in both Subtrees; otherwise false

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object