net.sourceforge.chaperon.model.pattern
Class CharacterSet

java.lang.Object
  extended bynet.sourceforge.chaperon.model.pattern.CharacterSet
All Implemented Interfaces:
CharacterClassElement, java.lang.Cloneable, java.io.Serializable

public class CharacterSet
extends java.lang.Object
implements CharacterClassElement

This represents a set of characters within a character class.

Version:
CVS $Id: CharacterSet.java,v 1.8 2004/01/18 01:36:29 benedikta Exp $
Author:
Stephan Michels
See Also:
Serialized Form

Constructor Summary
CharacterSet()
          Creates set of characters.
 
Method Summary
 java.lang.Object clone()
          Create a clone of this pattern.
 java.lang.String getCharacterAsCode()
           
 java.lang.String getCharacters()
          Returns the to comparing characters
 java.lang.String getLocation()
          Returns the location from the input source.
 void setCharacterAsCode(java.lang.String code)
           
 void setCharacters(java.lang.String set)
          Set the set of characters.
 void setLocation(java.lang.String location)
          Set the location from the input source.
 java.lang.String toString()
          Return a string representation of this pattern
 Violations validate()
          Validates this pattern.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharacterSet

public CharacterSet()
Creates set of characters.

Method Detail

setCharacters

public void setCharacters(java.lang.String set)
Set the set of characters.

Parameters:
set - Set of characters.

setCharacterAsCode

public void setCharacterAsCode(java.lang.String code)

getCharacters

public java.lang.String getCharacters()
Returns the to comparing characters

Returns:
To comparing characters

getCharacterAsCode

public java.lang.String getCharacterAsCode()

setLocation

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

Specified by:
setLocation in interface CharacterClassElement
Parameters:
location - Location in the input source.

getLocation

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

Specified by:
getLocation in interface CharacterClassElement
Returns:
Location in the input source.

toString

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

Specified by:
toString in interface CharacterClassElement
Returns:
String representation of the pattern.

clone

public java.lang.Object clone()
Create a clone of this 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 interface CharacterClassElement
Returns:
Return a list of violations, if this pattern isn't valid.


Copyright ? 2003 Chaperon project. All Rights Reserved.