net.sourceforge.chaperon.model.extended
Class Pattern

java.lang.Object
  extended bynet.sourceforge.chaperon.model.extended.Pattern
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
BeginOfText, CharacterClass, Element, EndOfText, PatternList, SingleCharacter, UniversalCharacter

public abstract class Pattern
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

This class describes an abstract pattern element.

Version:
CVS $Id: Pattern.java,v 1.11 2004/01/10 16:08:15 benedikta Exp $
Author:
Stephan Michels
See Also:
Serialized Form

Field Summary
 int index
           
 
Constructor Summary
Pattern()
           
 
Method Summary
 boolean addAscendingSuccessor(Pattern pattern)
           
 boolean addDescendingSuccessor(Pattern pattern)
           
 boolean addFirstPattern(Pattern pattern)
           
 boolean addLastPattern(Pattern pattern)
           
 boolean addSuccessor(Pattern pattern)
           
abstract  java.lang.Object clone()
          Create a clone this pattern.
abstract  boolean contains(char c)
           
abstract  boolean contains(char minimum, char maximum)
           
 PatternSet getAllPattern()
           
 PatternIterator getAncestors()
           
 PatternIterator getAscendingAncestors()
           
 PatternIterator getAscendingSuccessors()
           
 Definition getDefinition()
           
 PatternIterator getDescendingAncestors()
           
 PatternIterator getDescendingSuccessors()
           
 PatternIterator getFirstPattern()
           
 PatternIterator getLastPattern()
           
abstract  char[] getLimits()
           
 java.lang.String getLocation()
          Returns the location from the input source.
 PatternIterator getSuccessors()
           
abstract  java.lang.String getSymbol()
           
 boolean hasAncestor(Pattern pattern)
           
 boolean hasAscendingAncestor(Pattern pattern)
           
 boolean hasAscendingSuccessor(Pattern pattern)
           
 boolean hasDescendingAncestor(Pattern pattern)
           
 boolean hasDescendingSuccessor(Pattern pattern)
           
 boolean hasSuccessor(Pattern pattern)
           
 boolean isFirstPattern(Pattern pattern)
           
 boolean isLastPattern(Pattern pattern)
           
 boolean isNullable()
           
 void setDefinition(Definition definition)
           
 void setLocation(java.lang.String location)
          Set the location from the input source.
 void setNullable(boolean nullable)
           
 java.lang.String toString(PatternSet previous, PatternSet next)
           
 void update()
           
abstract  Violations validate()
          Validates this pattern.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

public final int index
Constructor Detail

Pattern

public Pattern()
Method Detail

isNullable

public final boolean isNullable()

setNullable

public final void setNullable(boolean nullable)

getFirstPattern

public final PatternIterator getFirstPattern()

isFirstPattern

public final boolean isFirstPattern(Pattern pattern)

addFirstPattern

public final boolean addFirstPattern(Pattern pattern)

getLastPattern

public final PatternIterator getLastPattern()

isLastPattern

public final boolean isLastPattern(Pattern pattern)

addLastPattern

public final boolean addLastPattern(Pattern pattern)

contains

public abstract boolean contains(char c)

getLimits

public abstract char[] getLimits()

contains

public abstract boolean contains(char minimum,
                                 char maximum)

getSymbol

public abstract java.lang.String getSymbol()

getAllPattern

public PatternSet getAllPattern()

setDefinition

public final void setDefinition(Definition definition)

getDefinition

public final Definition getDefinition()

getAncestors

public final PatternIterator getAncestors()

hasAncestor

public final boolean hasAncestor(Pattern pattern)

addSuccessor

public final boolean addSuccessor(Pattern pattern)

getSuccessors

public final PatternIterator getSuccessors()

hasSuccessor

public final boolean hasSuccessor(Pattern pattern)

getAscendingAncestors

public final PatternIterator getAscendingAncestors()

hasAscendingAncestor

public final boolean hasAscendingAncestor(Pattern pattern)

addAscendingSuccessor

public final boolean addAscendingSuccessor(Pattern pattern)

getAscendingSuccessors

public final PatternIterator getAscendingSuccessors()

hasAscendingSuccessor

public final boolean hasAscendingSuccessor(Pattern pattern)

getDescendingAncestors

public final PatternIterator getDescendingAncestors()

hasDescendingAncestor

public final boolean hasDescendingAncestor(Pattern pattern)

addDescendingSuccessor

public final boolean addDescendingSuccessor(Pattern pattern)

getDescendingSuccessors

public final PatternIterator getDescendingSuccessors()

hasDescendingSuccessor

public final boolean hasDescendingSuccessor(Pattern pattern)

update

public void update()

clone

public abstract java.lang.Object clone()
                                throws java.lang.CloneNotSupportedException
Create a clone this pattern.

Returns:
Clone of this pattern.
Throws:
java.lang.CloneNotSupportedException - If an exception occurs during the cloning.

setLocation

public final void setLocation(java.lang.String location)
Set the location from the input source.

Parameters:
location - Location in the input source.

getLocation

public final java.lang.String getLocation()
Returns the location from the input source.

Returns:
Location in the input source.

validate

public abstract Violations validate()
Validates this pattern.

Returns:
Return a list of violations, if this pattern isn't valid.

toString

public java.lang.String toString(PatternSet previous,
                                 PatternSet next)


Copyright ? 2003 Chaperon project. All Rights Reserved.