| java.lang.Object com.quadcap.util.OctetComparator
OctetComparator | public class OctetComparator implements Comparator(Code) | | This class implements a comparator for octet strings.
author: Stan Bailes |
Method Summary | |
public int | compare(Object a, Object b) Ordering: is object 'a' less, equal, or greater than object 'b'?
(From the ACAP draft: draft-ietf-acap-spec-06.txt)
Ordering comparators can determine the ordinal precedence of any
two values. | byte[] | getBytes(OctetString obj) The layer above which "i;octet" and "i;ascii-casemap" are the
same comparator. | boolean | pMatch(byte[] va, int a, byte[] vb, int b) | int | pMatchOrder(byte[] va, int a, byte[] vb, int b) | public boolean | patternMatch(OctetString obj, OctetString pattern) Determine if the search value matches a glob-style pattern. | public boolean | prefixMatch(OctetString obj, OctetString val) Determine if the search value is a prefix of the object being
searched. | public boolean | substringMatch(OctetString obj, OctetString val) Determine if the search value is a substring of the object being
searched. |
OctetComparator | public OctetComparator()(Code) | | Construct a new octet comparator.
|
OctetComparator | public OctetComparator(boolean casemap, boolean reverse)(Code) | | |
compare | public int compare(Object a, Object b)(Code) | | Ordering: is object 'a' less, equal, or greater than object 'b'?
(From the ACAP draft: draft-ietf-acap-spec-06.txt)
Ordering comparators can determine the ordinal precedence of any
two values. When used for ordering, a comparator's name can be
prefixed with "+" or "-" to indicate that the ordering should be
normal order or reversed order respectively. If no prefix is
included, "+" is assumed.
A comparator may designate certain values as having
an undefined ordinal precedence. Such values collate with equal
value after all other values regardless of whether normal or reverse
ordering is used.
Parameters: a - the first object to compare Parameters: b - the second object if a < b return -1 else if a > b return 1 else return 0 |
getBytes | byte[] getBytes(OctetString obj)(Code) | | The layer above which "i;octet" and "i;ascii-casemap" are the
same comparator.
Parameters: obj - the object whose bytes we want. |
pMatch | boolean pMatch(byte[] va, int a, byte[] vb, int b)(Code) | | |
pMatchOrder | int pMatchOrder(byte[] va, int a, byte[] vb, int b)(Code) | | |
patternMatch | public boolean patternMatch(OctetString obj, OctetString pattern)(Code) | | Determine if the search value matches a glob-style pattern.
Parameters: obj - the object to compare. Parameters: pattern - the pattern true if obj matches the pattern specified bypattern. |
prefixMatch | public boolean prefixMatch(OctetString obj, OctetString val)(Code) | | Determine if the search value is a prefix of the object being
searched. In the case of a prefix search on a multi-value,
the match is successful if the value is a prefix of any one of
the muliple values.
Parameters: obj - the "first" object to compare, normally the candidateobject in a SEARCH operation. Parameters: val - the "second" object, normally the constant valuespecified in the SEARCH operation. true if val is a prefix of obj. |
substringMatch | public boolean substringMatch(OctetString obj, OctetString val)(Code) | | Determine if the search value is a substring of the object being
searched. In the case of a substring search on a multi-value,
the match is successful if the value is a substring of any one of
the muliple values.
Parameters: obj - the "first" object to compare, normally the candidateobject in a SEARCH operation. Parameters: val - the "second" object, normally the constant valuespecified in the SEARCH operation. true if val is a substring of obj. |
|
|