|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jsieve.comparators.ComparatorUtils
public class ComparatorUtils
Class ComparatorUtils implements utility methods used by Comparators.
Method Summary | |
---|---|
static boolean |
contains(java.lang.String container,
java.lang.String contents)
Method contains answers a boolean indicating if the
parameter container contains the parameter
contents . |
static boolean |
contains(java.lang.String comparatorName,
java.lang.String container,
java.lang.String contents,
SieveContext context)
Method contains |
static boolean |
equals(java.lang.String string1,
java.lang.String string2)
Method equals answers a boolean indicating if the
parameter string1 is equal to the parameter
string2 . |
static boolean |
is(java.lang.String comparatorName,
java.lang.String string1,
java.lang.String string2,
SieveContext context)
Method is |
static boolean |
match(java.lang.String comparatorName,
java.lang.String matchType,
java.lang.String matchTarget,
java.lang.String matchArgument,
SieveContext context)
Method match answers a boolean indicating if the parameter
matchTarget compares to parameter
matchArgument is a match of matchType using
the comparator comparatorName . |
static boolean |
matches(java.lang.String string,
java.lang.String glob)
Method matches answers a boolean indicating if the
parameter string matches the glob pattern described by
parameter glob . |
static boolean |
matches(java.lang.String comparatorName,
java.lang.String string,
java.lang.String glob,
SieveContext context)
Method matches answers a boolean indicating if the
parameter
string/code> is matched by the patterm |
static java.lang.String |
sieveToJavaRegex(java.lang.String pattern)
Converts a Sieve pattern in a java regex pattern |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean match(java.lang.String comparatorName, java.lang.String matchType, java.lang.String matchTarget, java.lang.String matchArgument, SieveContext context) throws SieveException
match
answers a boolean indicating if the parameter
matchTarget
compares to parameter
matchArgument
is a match of matchType
using
the comparator comparatorName
.
comparatorName
- not nullmatchType
- not nullmatchTarget
- not nullmatchArgument
- not nullcontext
- not null
SieveException
public static boolean matches(java.lang.String string, java.lang.String glob) throws SievePatternException
Method matches
answers a boolean indicating if the
parameter string
matches the glob pattern described by
parameter glob
.
string
- glob
-
SievePatternException
public static boolean contains(java.lang.String container, java.lang.String contents)
Method contains
answers a boolean indicating if the
parameter container
contains the parameter
contents
.
container
- contents
-
public static boolean equals(java.lang.String string1, java.lang.String string2)
Method equals
answers a boolean indicating if the
parameter string1
is equal to the parameter
string2
.
string1
- string2
-
public static java.lang.String sieveToJavaRegex(java.lang.String pattern)
public static boolean contains(java.lang.String comparatorName, java.lang.String container, java.lang.String contents, SieveContext context) throws SieveException
contains answers a boolean indicating if the parameter
container
contains the parameter contents
using an
instance of comparatorName
.
- Parameters:
comparatorName
- not nullcontainer
- not nullcontents
- not nullcontext
- not null
- Returns:
- boolean
- Throws:
SieveException
public static boolean is(java.lang.String comparatorName, java.lang.String string1, java.lang.String string2, SieveContext context) throws LookupException
is answers a boolean indicating if the parameter
container
is equal to the parameter contents
using
an instance of comparatorName
.
- Parameters:
comparatorName
- string1
- not nullstring2
- not nullcontext
- not null
- Returns:
- boolean
- Throws:
LookupException
public static boolean matches(java.lang.String comparatorName, java.lang.String string, java.lang.String glob, SieveContext context) throws SieveException
matches
answers a boolean indicating if the
parameter
string/code> is matched by the patterm glob
using an
instance of comparatorName
.
- Parameters:
comparatorName
- not nullstring
- not nullglob
- not nullcontext
- not null
- Returns:
- boolean
- Throws:
SieveException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |