net.sourceforge.chaperon.model.extended
Class SingleCharacter

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

public class SingleCharacter
extends Pattern

This class represents a pattern for a sequence of characters.

Version:
CVS $Id: SingleCharacter.java,v 1.6 2004/01/12 08:54:11 benedikta Exp $
Author:
Stephan Michels
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.chaperon.model.extended.Pattern
index
 
Constructor Summary
SingleCharacter()
          Creates a pattern for a character sequence.
SingleCharacter(char character)
          Creates a pattern for a character sequence.
 
Method Summary
 java.lang.Object clone()
          Create a clone of this pattern.
 boolean contains(char c)
           
 boolean contains(char minimum, char maximum)
           
 char getCharacter()
          Returns the sequence of characters
 java.lang.String getCharacterAsString()
           
 char[] getLimits()
           
 java.lang.String getSymbol()
           
 void setCharacter(char character)
          Set the sequence of characters for this pattern
 void setCharacterAsString(java.lang.String character)
          Set the sequence of characters for this pattern
 java.lang.String toString()
          Return a string representation of this pattern
 void update()
           
 Violations validate()
          Validates this pattern.
 
Methods inherited from class net.sourceforge.chaperon.model.extended.Pattern
addAscendingSuccessor, addDescendingSuccessor, addFirstPattern, addLastPattern, addSuccessor, getAllPattern, getAncestors, getAscendingAncestors, getAscendingSuccessors, getDefinition, getDescendingAncestors, getDescendingSuccessors, getFirstPattern, getLastPattern, getLocation, getSuccessors, hasAncestor, hasAscendingAncestor, hasAscendingSuccessor, hasDescendingAncestor, hasDescendingSuccessor, hasSuccessor, isFirstPattern, isLastPattern, isNullable, setDefinition, setLocation, setNullable, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingleCharacter

public SingleCharacter()
Creates a pattern for a character sequence.


SingleCharacter

public SingleCharacter(char character)
Creates a pattern for a character sequence.

Method Detail

setCharacter

public void setCharacter(char character)
Set the sequence of characters for this pattern


setCharacterAsString

public void setCharacterAsString(java.lang.String character)
Set the sequence of characters for this pattern


getCharacter

public char getCharacter()
Returns the sequence of characters

Returns:
Seqence of characaters

getCharacterAsString

public java.lang.String getCharacterAsString()

update

public void update()
Overrides:
update in class Pattern

getLimits

public char[] getLimits()
Specified by:
getLimits in class Pattern

contains

public boolean contains(char minimum,
                        char maximum)
Specified by:
contains in class Pattern

contains

public boolean contains(char c)
Specified by:
contains in class Pattern

getSymbol

public java.lang.String getSymbol()
Specified by:
getSymbol in class Pattern

toString

public java.lang.String toString()
Return a string representation of this pattern

Returns:
String representation of the pattern.

clone

public java.lang.Object clone()
Create a clone of this pattern.

Specified by:
clone in class Pattern
Returns:
Clone of this pattern.
Throws:
java.lang.CloneNotSupportedException - If an exception occurs during the cloning.

validate

public Violations validate()
Validates this pattern.

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


Copyright ? 2003 Chaperon project. All Rights Reserved.