Package com.isode.dsapi.util
Class OCList
java.lang.Object
com.isode.dsapi.util.OCList
Class for efficiently storing a list of objectclasses, providing
various simple operations on them. Note that this is a compact
representation suitable for use in hashes and indexes, etc.
See also ObjectClasses which is an expanded list of objectclasses suitable for analysis and manipulation. Note that this class can handle schema-unknown objectclasses, whereas ObjectClasses cannot.
- Author:
- jp
-
Constructor Summary
ConstructorsConstructorDescriptionOCList()
Construct an empty OCList.Construct from an Attribute (or null, giving a blank list)OCList
(AttributeValue[] avarr) Construct from an array of AttributeValue, as returned by EditedEntry.getCurrentValues() for example.Construct from an Entry.Construct from an array of strings. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Test to see if the objectclass list contains the given objectclass.boolean
Compares according to equality of keys from generateKey().Generate a string key that will compare different only if the set of objectclasses should be regarded as different.String[]
Return the OCList as an array of Strings.toString()
Debug-string.
-
Constructor Details
-
OCList
public OCList()Construct an empty OCList. -
OCList
Construct from an array of strings. -
OCList
Construct from an array of AttributeValue, as returned by EditedEntry.getCurrentValues() for example. Logs warnings if there are non-string objectclass attributes in the entry. -
OCList
Construct from an Entry. -
OCList
Construct from an Attribute (or null, giving a blank list)
-
-
Method Details
-
generateKey
Generate a string key that will compare different only if the set of objectclasses should be regarded as different. It consists of the sorted list of lowercased objectclasses separated by spaces. -
contains
Test to see if the objectclass list contains the given objectclass. -
getStrings
Return the OCList as an array of Strings. -
equals
Compares according to equality of keys from generateKey(). -
toString
Debug-string.
-