|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dtools.ini.IniValidator
public class IniValidator
An IniValidator provides IniFile
s, IniSection
s,
and IniItems
a way of validating a name for an
IniSection
or IniItem
which is performed by the
methods:
boolean isValidItemName(String)
boolean isValidSectionName(String)
This class also allows users to define their own definitions of valid
names through the use of regular expressions and the object
java.util.regex.Pattern
being passed to one
of the following methods:
boolean setItemNameRegEx(Pattern)
boolean setSectionNameRegEx(Pattern)
Constructor Summary | |
---|---|
IniValidator()
Default constructor, creates a new IniValidator |
Method Summary | |
---|---|
Object |
clone()
The method provides cloning features to the IniValidator class. |
boolean |
equals(Object other)
Predicate that returns true if another IniValidator is equal
to this IniValidator . |
int |
hashCode()
This overrides and implements Object's hashCode method, and produces a hash code for this object. |
boolean |
isValidItemName(String name)
Predicate that returns true if the given name is valid for a IniItem. |
boolean |
isValidSectionName(String name)
Predicate that returns true is the given name is valid for a IniSection. |
void |
setItemNameRegEx(Pattern itemNameRegEx)
Sets the regular Expression pattern for a valid IniItem name. |
void |
setSectionNameRegEx(Pattern sectionNameRegEx)
Sets the regular Expression pattern for a valid IniSection's name. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IniValidator()
Method Detail |
---|
public boolean isValidItemName(String name)
name
- The name of an IniItem.
public boolean isValidSectionName(String name)
name
- The name of the IniSection.
public void setItemNameRegEx(Pattern itemNameRegEx)
isValidItemName(String)
method to
validate names.
itemNameRegEx
- the regular expression pattern for an item's namepublic void setSectionNameRegEx(Pattern sectionNameRegEx)
isValidSectioname(String)
method
to validate names.
sectionNameRegEx
- the regular expression pattern for a section's
namepublic boolean equals(Object other)
IniValidator
is equal
to this IniValidator
. Two IniValidator
s are
considered equal if they both have the same regular expression used for
for validating items names and section names.
equals
in class Object
other
- The other object to compare with
public int hashCode()
hashCode
in class Object
public Object clone()
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |