net.sourceforge.chaperon.model.pattern
Class CharacterInterval

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

public class CharacterInterval
extends java.lang.Object
implements CharacterClassElement

This class represents a interval of characters within a character class.

Version:
CVS $Id: CharacterInterval.java,v 1.5 2003/12/09 19:55:52 benedikta Exp $
Author:
Stephan Michels
See Also:
Serialized Form

Constructor Summary
CharacterInterval()
          Creates a interval of characters.
 
Method Summary
 java.lang.Object clone()
          Create a clone of this pattern.
 java.lang.String getLocation()
          Returns the location from the input source.
 char getMaximum()
          Returns the maximum character for the interval.
 char getMinimum()
          Returns the minimum character for the interval.
 void setLocation(java.lang.String location)
          Set the location from the input source.
 void setMaximum(char maximum)
          Sets the maximum character for the interval.
 void setMinimum(char minimum)
          Sets the minimum character for the interval.
 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

CharacterInterval

public CharacterInterval()
Creates a interval of characters.

Method Detail

setMinimum

public void setMinimum(char minimum)
Sets the minimum character for the interval.

Parameters:
minimum - Minimum character.

getMinimum

public char getMinimum()
Returns the minimum character for the interval.

Returns:
Minimum character.

setMaximum

public void setMaximum(char maximum)
Sets the maximum character for the interval.

Parameters:
maximum - Maximum character.

getMaximum

public char getMaximum()
Returns the maximum character for the interval.

Returns:
Maximum character.

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.