public class OidRegistry<T extends SchemaObject> extends Object implements Iterable<T>
Constructor and Description |
---|
OidRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
contains(String oid)
Tells if the given OID is present on this registry
|
OidRegistry<T> |
copy()
Copy the OidRegistry, without the contained values
|
List<String> |
getNameSet(String oid)
Gets the names associated with an OID.
|
String |
getPrimaryName(String oid)
Gets the primary name associated with an OID.
|
T |
getSchemaObject(String oid)
Gets the SchemaObject associated with an OID.
|
Iterator<T> |
iterator()
Lists all the SchemaObjects within the registry.
|
Iterator<String> |
iteratorOids()
Lists all the OIDs within the registry.
|
void |
register(T schemaObject)
Adds an OID name pair to the registry.
|
int |
size() |
String |
toString() |
void |
unregister(String oid)
Removes an oid from this registry.
|
public OidRegistry()
public boolean contains(String oid)
oid
- The OID to lookuppublic String getPrimaryName(String oid) throws LdapException
oid
- the object identifierLdapException
- if oid does not existpublic T getSchemaObject(String oid) throws LdapException
oid
- the object identifierLdapException
- if oid does not existpublic List<String> getNameSet(String oid) throws LdapException
oid
- the OID for which we return the set of common namesLdapException
- if oid does not existpublic Iterator<String> iteratorOids()
public Iterator<T> iterator()
iterator
in interface Iterable<T extends SchemaObject>
public void register(T schemaObject) throws LdapException
schemaObject
- The SchemaObject the oid belongs toLdapException
public void unregister(String oid) throws LdapException
oid
- the numeric identifier for the objectLdapException
- if the identifier is not numericpublic OidRegistry<T> copy()
public int size()
public void clear()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.