On this page
Class ModificationItem
- All Implemented Interfaces:
-
Serializable
public class ModificationItem extends Object implements Serializable
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
Constructor | Description |
---|---|
ModificationItem |
Creates a new instance of ModificationItem.
|
Method Summary
Modifier and Type | Method | Description |
---|---|---|
Attribute |
getAttribute() |
Retrieves the attribute associated with this modification item.
|
int |
getModificationOp() |
Retrieves the modification code of this modification item.
|
String |
toString() |
Generates the string representation of this modification item, which consists of the modification operation and its related attribute.
|
Constructor Details
ModificationItem
public ModificationItem(int mod_op, Attribute attr)
- 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()
- Returns:
- The modification code. It is one of: DirContext.ADD_ATTRIBUTE DirContext.REPLACE_ATTRIBUTE DirContext.REMOVE_ATTRIBUTE
getAttribute
public Attribute getAttribute()
- Returns:
- The non-null attribute to use for the modification.
toString
public String toString()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.naming/javax/naming/directory/ModificationItem.html