edu.mit.csail.aeolus.api
Class AeolusLabel

java.lang.Object
  extended by edu.mit.csail.aeolus.api.AeolusLabel
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public final class AeolusLabel
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

An AeolusLabel is a collection of AeolusTags.

See Also:
Serialized Form

Constructor Summary
AeolusLabel()
          Creates a new empty label
 
Method Summary
 void addTag(AeolusTag t)
          Adds tag t to this
 AeolusLabel clone()
          Returns a copy of this
 boolean equals(AeolusLabel l)
          Checks if this and l have the same tags
 boolean hasTag(AeolusTag t)
          Checks if this contains tag t
 AeolusLabel intersection(AeolusLabel l)
          Intersect this with l
 boolean isEmpty()
          Checks whether this is empty
 boolean isSubsetOf(AeolusLabel l)
          Checks if the tags in this are a subset of the tags in l
 java.util.List<AeolusTag> members()
          Returns a list of tags in the label
 void removeTag(AeolusTag t)
          Removes tag t from this
 int size()
          Returns the number of tags in this label
 java.lang.String toString()
          Returns the string representation of this label
 AeolusLabel union(AeolusLabel l)
          Form the union of this and l
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AeolusLabel

public AeolusLabel()
Creates a new empty label

Method Detail

addTag

public void addTag(AeolusTag t)
Adds tag t to this


clone

public AeolusLabel clone()
Returns a copy of this

Overrides:
clone in class java.lang.Object
Returns:
a copy of this

equals

public boolean equals(AeolusLabel l)
Checks if this and l have the same tags

Parameters:
l -
Returns:
true if this and l have the same tags, else false

hasTag

public boolean hasTag(AeolusTag t)
Checks if this contains tag t

Returns:
true if this contains tag t or a supertag of t

intersection

public AeolusLabel intersection(AeolusLabel l)
Intersect this with l

Returns:
the intersection of this and l

isEmpty

public boolean isEmpty()
Checks whether this is empty

Returns:
true if this is contains no tags, else false

isSubsetOf

public boolean isSubsetOf(AeolusLabel l)
Checks if the tags in this are a subset of the tags in l

Returns:
true if the tags in this are a subset of the tags in l

members

public java.util.List<AeolusTag> members()
Returns a list of tags in the label

Returns:
a list of tags in the label

removeTag

public void removeTag(AeolusTag t)
Removes tag t from this


size

public int size()
Returns the number of tags in this label

Returns:
the number of tags in this label

toString

public java.lang.String toString()
Returns the string representation of this label

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this label

union

public AeolusLabel union(AeolusLabel l)
Form the union of this and l

Returns:
the union of this and l