|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.core.util.PatternArbiter
public class PatternArbiter
Provides utility methods for pattern-oriented tasks.
Constructor Summary | |
---|---|
PatternArbiter()
|
Method Summary | |
---|---|
static void |
checkAIMLPattern(java.lang.String pattern,
boolean ignoreCase)
Determines whether a given string is a valid AIML pattern. |
static void |
main(java.lang.String[] args)
For testing. |
static boolean |
matches(java.lang.String literal,
java.lang.String pattern,
boolean ignoreCase)
Decides whether a given pattern matches a given literal, in an isolated context, according to the AIML pattern-matching specification. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PatternArbiter()
Method Detail |
---|
public static boolean matches(java.lang.String literal, java.lang.String pattern, boolean ignoreCase) throws NotAnAIMLPatternException
literal
- the literal string to checkpattern
- the pattern to try to match against it
true
if pattern
matches literal
, false
if not
NotAnAIMLPatternException
- if the pattern is not a valid AIML pattern
(conditioned by ignoreCase
public static void checkAIMLPattern(java.lang.String pattern, boolean ignoreCase) throws NotAnAIMLPatternException
ignoreCase
.
pattern
- the string to checkignoreCase
- whether to ignore case
NotAnAIMLPatternException
- with a helpful message if the pattern is not validpublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |