net.sourceforge.chaperon.model.extended
Class Pattern
java.lang.Object
net.sourceforge.chaperon.model.extended.Pattern
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
- 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
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
index
public final int index
Pattern
public Pattern()
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.
- Overrides:
clone
in class java.lang.Object
- 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.