net.sourceforge.chaperon.model.extended
Class Definition

java.lang.Object
  extended bynet.sourceforge.chaperon.model.extended.Pattern
      extended bynet.sourceforge.chaperon.model.extended.PatternList
          extended bynet.sourceforge.chaperon.model.extended.Definition
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Definition
extends PatternList

This class presents a definition of a grammar

Version:
CVS $Id: Definition.java,v 1.4 2004/01/15 20:13:35 benedikta Exp $
Author:
Stephan Michels
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.chaperon.model.extended.Pattern
index
 
Constructor Summary
Definition()
          Create an empty definition.
Definition(java.lang.String symbol)
          Create a definition.
 
Method Summary
 java.lang.Object clone()
          Create a clone this pattern.
 boolean equals(java.lang.Object o)
          Compares the definition with another definition.
 java.lang.String getSymbol()
          Return the symbol from this definition
 boolean isOmitable()
           
 boolean isReleaseable()
           
 void setOmitable(boolean omitable)
           
 void setReleaseable(boolean releaseable)
           
 void setSymbol(java.lang.String symbol)
          Set the symbol for this definition
 java.lang.String toString(PatternSet previous, PatternSet next)
          Return a string representation of the definition.
 Violations validate()
          Validates the definition.
 
Methods inherited from class net.sourceforge.chaperon.model.extended.PatternList
addPattern, contains, contains, getAllPattern, getLimits, getPattern, getPattern, getPatternAsArray, getPatternCount, toString, update
 
Methods inherited from class net.sourceforge.chaperon.model.extended.Pattern
addAscendingSuccessor, addDescendingSuccessor, addFirstPattern, addLastPattern, addSuccessor, getAncestors, getAscendingAncestors, getAscendingSuccessors, getDefinition, getDescendingAncestors, getDescendingSuccessors, getFirstPattern, getLastPattern, getLocation, getSuccessors, hasAncestor, hasAscendingAncestor, hasAscendingSuccessor, hasDescendingAncestor, hasDescendingSuccessor, hasSuccessor, isFirstPattern, isLastPattern, isNullable, setDefinition, setLocation, setNullable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Definition

public Definition()
Create an empty definition.


Definition

public Definition(java.lang.String symbol)
Create a definition.

Method Detail

setSymbol

public void setSymbol(java.lang.String symbol)
Set the symbol for this definition


getSymbol

public java.lang.String getSymbol()
Return the symbol from this definition

Overrides:
getSymbol in class PatternList
Returns:
Nonterminal symbol

setReleaseable

public void setReleaseable(boolean releaseable)

isReleaseable

public boolean isReleaseable()

setOmitable

public void setOmitable(boolean omitable)

isOmitable

public boolean isOmitable()

validate

public Violations validate()
Validates the definition.

Specified by:
validate in class Pattern
Returns:
Return a list of violations, if this object isn't valid.

equals

public boolean equals(java.lang.Object o)
Compares the definition with another definition.

Parameters:
o - Other object.
Returns:
True, if the definition are equal.

toString

public java.lang.String toString(PatternSet previous,
                                 PatternSet next)
Return a string representation of the definition.

Overrides:
toString in class PatternList
Returns:
String representation of the definition.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: Pattern
Create a clone this pattern.

Specified by:
clone in class Pattern
Returns:
Throws:
java.lang.CloneNotSupportedException


Copyright ? 2003 Chaperon project. All Rights Reserved.