laser.alphabet.labelpattern
Interface LabelPatternInterface<L extends LabelInterface>

Type Parameters:
L - The type of Label with respect to which this LabelPatternInterface has meaning.
All Superinterfaces:
java.lang.Cloneable, java.lang.Comparable<LabelPatternInterface<? extends L>>, java.io.Serializable
All Known Subinterfaces:
ClassSetLabelPatternInterface<L>, NotClassSetLabelPatternInterface<L>
All Known Implementing Classes:
AbstractClassSetLabelPattern, AllLabelPattern, ClassSetLabelPattern, IndexedLabelPattern, NotClassSetLabelPattern

public interface LabelPatternInterface<L extends LabelInterface>
extends java.lang.Cloneable, java.lang.Comparable<LabelPatternInterface<? extends L>>, java.io.Serializable

An interface implemented by all types of LabelPatterns.

LabelPatterns only have meaning with respect to one type of Label (and hence the type of Alphabet that contains the type of Label). With respect to an Alphabet of the correct type, a LabelPattern specifies a (not necessarily strict) subset of the Labels in the Alphabet.

Unlike Alphabets, LabelPatterns can be associated with a specific part of a graph-like object, such as a single edge.

There are many possible ways that LabelPatterns can define the subset of Labels that they specify, some specific to certain types of Alphabets. However, there are certain universal definitions that apply to all types of Alphabets:

Author:
Nathan A.Jokel (laser-software@cs.umass.edu)
See Also:
AlphabetInterface, LabelInterface, laser.alphabetinterface.labelpatterninterface.ClassSetLabelPatternInterface, laser.alphabetinterface.labelpatterninterface.NotClassSetLabelPatternInterface

Method Summary
 LabelPatternInterface<L> clone()
          Returns a copy of this LabelPatternInterface.
 boolean equals(java.lang.Object obj)
          Compares this LabelPatternInterface with the specified Object for equality.
 java.util.Set<L> getMatchingLabels(AlphabetInterface<? extends L> alphabet)
          Returns a Set containing the subset of Labels of the specified Alphabet that this LabelPattern specifies.
 int hashCode()
          Returns a hash code value for this LabelPatternInterface.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

clone

LabelPatternInterface<L> clone()
Returns a copy of this LabelPatternInterface.

Returns:
The copy.

equals

boolean equals(java.lang.Object obj)
Compares this LabelPatternInterface with the specified Object for equality.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The Object to test for equality.
Returns:
true if the specified Object equals this LabelPatternInterface, false otherwise.

hashCode

int hashCode()
Returns a hash code value for this LabelPatternInterface.

Overrides:
hashCode in class java.lang.Object
Returns:
A hash code value for this LabelPatternInterface.

getMatchingLabels

java.util.Set<L> getMatchingLabels(AlphabetInterface<? extends L> alphabet)
Returns a Set containing the subset of Labels of the specified Alphabet that this LabelPattern specifies.

Parameters:
alphabet - The Alphabet of which this LabelPattern is to specify a subset.
Returns:
The subset.
Throws:
java.lang.NullPointerException - When the specified Alphabet is null.