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.4 2002/09/29 08:20:52 bayard Exp $
Author:
Henri Yandell, Stephen Colebourne

Field Summary
private  java.util.LinkedList set
           
 
Constructor Summary
protected CharSet(java.lang.String[] set)
          Restricted constructor.
 
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 constructor. Use the factory method evaluateSet().
Throws:
NullPointerException - if any of set[i] is null or if set is null
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
Throws:
NullPointerException - if str is null

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