Interface MatchingRule
-
- All Known Subinterfaces:
ApproximateMatchingRule
,EqualityMatchingRule
,OrderingMatchingRule
,SubstringMatchingRule
@NotExtensible @ThreadSafety(level=INTERFACE_THREADSAFE) public interface MatchingRule
This interface provides an API for interacting with matching rules, which can be used to perform matching-related operations against data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Indicates whether the provided object is equal to this matching rule.java.lang.String
getDescription()
Retrieves the description for this matching rule, if any.java.lang.String
getName()
Retrieves the name for this matching rule, if any.java.lang.String
getNameOrOID()
Retrieves the name for this matching rule, or the numeric OID if it does not have a name.java.lang.String
getOID()
Retrieves the numeric OID for this matching rule.java.lang.String
getSyntaxOID()
Retrieves the OID of the attribute syntax with which this matching rule is most closely associated.int
hashCode()
Retrieves the hash code for this matching rule.boolean
hasNameOrOID(java.lang.String name)
Indicates whether the provided string matches the name or numeric OID for this matching rule.boolean
isObsolete()
Indicates whether this matching rule is declared obsolete in the server schema.ByteString
normalizeValue(AttributeType type, ByteString value)
Retrieves the normalized form of the provided value.ByteString
normalizeValue(ByteString value)
Retrieves the normalized form of the provided value.java.lang.String
toString()
Retrieves a string representation of this matching rule.ConditionResult
valuesMatch(ByteString normAttributeValue, ByteString normAssertionValue)
Indicates whether the provided attribute value may be considered logically equivalent to the provided assertion value according to the constraints of this matching rule..
-
-
-
Method Detail
-
getOID
java.lang.String getOID()
Retrieves the numeric OID for this matching rule.- Returns:
- The numeric OID for this matching rule.
-
getName
java.lang.String getName()
Retrieves the name for this matching rule, if any.- Returns:
- The name for this matching rule, or
null
if it does not have a name.
-
getNameOrOID
java.lang.String getNameOrOID()
Retrieves the name for this matching rule, or the numeric OID if it does not have a name.- Returns:
- The name for this matching rule, or the numeric OID if it does not have a name.
-
hasNameOrOID
boolean hasNameOrOID(java.lang.String name)
Indicates whether the provided string matches the name or numeric OID for this matching rule.- Parameters:
name
- The name for which to make the determination.- Returns:
true
if the provided string matches the name or numeric OID for this matching rule, orfalse
if not.
-
getDescription
java.lang.String getDescription()
Retrieves the description for this matching rule, if any.- Returns:
- The description for this matching rule, or
null
if it does not have a description.
-
getSyntaxOID
java.lang.String getSyntaxOID()
Retrieves the OID of the attribute syntax with which this matching rule is most closely associated.- Returns:
- The OID of the attribute syntax with which this matching rule is most closely associated.
-
isObsolete
boolean isObsolete()
Indicates whether this matching rule is declared obsolete in the server schema.- Returns:
true
if this matching rule is declared obsolete, orfalse
if not.
-
normalizeValue
ByteString normalizeValue(ByteString value) throws LDAPException
Retrieves the normalized form of the provided value.- Parameters:
value
- The value to be normalized.- Returns:
- The normalized form of the provided value.
- Throws:
LDAPException
- If an error occurs while attempting to normalize the provided value (e.g., it does not conform to the appropriate syntax).
-
normalizeValue
ByteString normalizeValue(AttributeType type, ByteString value) throws LDAPException
Retrieves the normalized form of the provided value.- Parameters:
type
- The associated attribute type.value
- The value to be normalized.- Returns:
- The normalized form of the provided value.
- Throws:
LDAPException
- If an error occurs while attempting to normalize the provided value (e.g., it does not conform to the appropriate syntax).
-
valuesMatch
ConditionResult valuesMatch(ByteString normAttributeValue, ByteString normAssertionValue)
Indicates whether the provided attribute value may be considered logically equivalent to the provided assertion value according to the constraints of this matching rule..- Parameters:
normAttributeValue
- The normalized form of the attribute value to be compared.normAssertionValue
- The normalized form of the assertion value to be compared.- Returns:
TRUE
if the values are considered equal,FALSE
if the values are considered different, orUNDEFINED
if the result is not defined for this matching rule.
-
hashCode
int hashCode()
Retrieves the hash code for this matching rule.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hash code for this matching rule.
-
equals
boolean equals(java.lang.Object o)
Indicates whether the provided object is equal to this matching rule.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- The object for which to make the determination.- Returns:
true
if the provided object is equal to this matching rule, orfalse
if not.
-
toString
java.lang.String toString()
Retrieves a string representation of this matching rule.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this matching rule.
-
-