net.sourceforge.chaperon.model.extended
Class CharacterInterval

java.lang.Object
  extended bynet.sourceforge.chaperon.model.extended.CharacterInterval

public class CharacterInterval
extends java.lang.Object

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

Version:
CVS $Id: CharacterInterval.java,v 1.1 2003/12/12 14:11:34 benedikta Exp $
Author:
Stephan Michels

Constructor Summary
CharacterInterval()
          Creates a interval of characters.
 
Method Summary
 void addSingleCharacter(SingleCharacter character)
           
 java.lang.Object clone()
          Create a clone of this pattern.
 boolean contains(char c)
           
 boolean contains(char minimum, char maximum)
           
 SingleCharacter getFirstCharacter()
          Returns the first character for the interval.
 SingleCharacter getLastCharacter()
          Returns the last character for the interval.
 char[] getLimits()
           
 java.lang.String getLocation()
          Returns the location from the input source.
 SingleCharacter[] getSingleCharacters()
           
 void setFirstCharacter(SingleCharacter first)
          Sets the first character for the interval.
 void setLastCharacter(SingleCharacter last)
          Sets the last character for the interval.
 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

CharacterInterval

public CharacterInterval()
Creates a interval of characters.

Method Detail

setFirstCharacter

public void setFirstCharacter(SingleCharacter first)
Sets the first character for the interval.

Parameters:
first - First character.

getFirstCharacter

public SingleCharacter getFirstCharacter()
Returns the first character for the interval.

Returns:
First character.

setLastCharacter

public void setLastCharacter(SingleCharacter last)
Sets the last character for the interval.

Parameters:
last - Last character.

getLastCharacter

public SingleCharacter getLastCharacter()
Returns the last character for the interval.

Returns:
Last character.

addSingleCharacter

public void addSingleCharacter(SingleCharacter character)

getSingleCharacters

public SingleCharacter[] getSingleCharacters()

getLimits

public char[] getLimits()

contains

public boolean contains(char minimum,
                        char maximum)

contains

public boolean contains(char c)

setLocation

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

Parameters:
location - Location in the input source.

getLocation

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

Returns:
Location in the input source.

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.

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

validate

public Violations validate()
Validates this pattern.

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


Copyright ? 2003 Chaperon project. All Rights Reserved.