Class ModificationItem
java.lang.Object
javax.naming.directory.ModificationItem
- All Implemented Interfaces:
Serializable
This class represents a modification item.
It consists of a modification code and an attribute on which to operate.
A ModificationItem instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single ModificationItem instance should lock the object.
- Since:
- 1.3
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionModificationItem(int mod_op, Attribute attr) Creates a new instance of ModificationItem. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the attribute associated with this modification item.intRetrieves the modification code of this modification item.toString()Generates the string representation of this modification item, which consists of the modification operation and its related attribute.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Constructor Details
-
ModificationItem
Creates a new instance of ModificationItem.- Parameters:
mod_op- Modification to apply. It must be one of: DirContext.ADD_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE DirContext.REMOVE_ATTRIBUTEattr- The non-null attribute to use for modification.- Throws:
IllegalArgumentException- If attr is null, or if mod_op is not one of the ones specified above.
-
-
Method Details
-
getModificationOp
public int getModificationOp()Retrieves the modification code of this modification item.- Returns:
- The modification code. It is one of: DirContext.ADD_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE DirContext.REMOVE_ATTRIBUTE
-
getAttribute
Retrieves the attribute associated with this modification item.- Returns:
- The non-null attribute to use for the modification.
-
toString
Generates the string representation of this modification item, which consists of the modification operation and its related attribute. The string representation is meant for debugging and not to be interpreted programmatically.
-