org.apache.commons.lang
Class CharSet

java.lang.Object
  |
  +--org.apache.commons.lang.CharSet

public class CharSet
extends java.lang.Object

A set of characters. You can iterate over the characters in the set.

Version:
$Id: CharSet.java,v 1.1 2002/07/19 03:35:54 bayard Exp $
Author:
Henri Yandell, Stephen Colebourne

Field Summary
private  java.util.LinkedList set
           
 
Constructor Summary
protected CharSet(java.lang.String[] set)
          Restricted consructor.
 
Method Summary
protected  void add(java.lang.String str)
          Add a set definition string to the set
 boolean contains(char ch)
          Does the set contain the character specified
 java.lang.String toString()
          Returns a string representation of the set
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

set

private java.util.LinkedList set
Constructor Detail

CharSet

protected CharSet(java.lang.String[] set)
Restricted consructor. Use the factory method evaluateSet().
Method Detail

contains

public boolean contains(char ch)
Does the set contain the character specified
Parameters:
ch - the character to check for
Returns:
true if it does contain it

add

protected void add(java.lang.String str)
Add a set definition string to the set
Parameters:
str - set definition string

toString

public java.lang.String toString()
Returns a string representation of the set
Overrides:
toString in class java.lang.Object
Returns:
string representation


Copyright (c) 2001-2002 - Apache Software Foundation