From f2160f4bd1c8ac67e5a86a6710d431e8932877f9 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 28 May 2010 11:47:51 +0000
Subject: [PATCH] Synchronize SDK on java.net with internal repository.
---
sdk/src/org/opends/sdk/Modification.java | 53 +++++++++++++++++++++++++++--------------------------
1 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/sdk/src/org/opends/sdk/Change.java b/sdk/src/org/opends/sdk/Modification.java
similarity index 74%
rename from sdk/src/org/opends/sdk/Change.java
rename to sdk/src/org/opends/sdk/Modification.java
index 3fdc37b..e0fe1f0 100644
--- a/sdk/src/org/opends/sdk/Change.java
+++ b/sdk/src/org/opends/sdk/Modification.java
@@ -29,7 +29,6 @@
-
import com.sun.opends.sdk.util.Validator;
@@ -39,7 +38,7 @@
* <p>
* TODO: other constructors.
*/
-public final class Change
+public final class Modification
{
private final ModificationType modificationType;
@@ -48,23 +47,24 @@
/**
- * Creates a new modification having the provided modification type
- * and attribute values to be updated. Note that while the returned
- * {@code Change} is immutable, the underlying attribute may not be.
- * The following code ensures that the returned {@code Change} is
- * fully immutable:
+ * Creates a new modification having the provided modification type and
+ * attribute values to be updated. Note that while the returned {@code
+ * Modification} is immutable, the underlying attribute may not be. The
+ * following code ensures that the returned {@code Modification} is fully
+ * immutable:
*
* <pre>
- * Change change =
- * new Change(modificationType, Types.unmodifiableAttribute(attribute));
+ * Modification change = new Modification(modificationType, Types
+ * .unmodifiableAttribute(attribute));
* </pre>
*
* @param modificationType
- * The type of change to be performed.
+ * The type of modification to be performed.
* @param attribute
* The the attribute containing the values to be modified.
*/
- public Change(ModificationType modificationType, Attribute attribute)
+ public Modification(final ModificationType modificationType,
+ final Attribute attribute)
{
Validator.ensureNotNull(modificationType, attribute);
@@ -75,18 +75,6 @@
/**
- * Returns the type of change to be performed.
- *
- * @return The type of change to be performed.
- */
- public ModificationType getModificationType()
- {
- return modificationType;
- }
-
-
-
- /**
* Returns the attribute containing the values to be modified.
*
* @return The the attribute containing the values to be modified.
@@ -99,18 +87,31 @@
/**
+ * Returns the type of modification to be performed.
+ *
+ * @return The type of modification to be performed.
+ */
+ public ModificationType getModificationType()
+ {
+ return modificationType;
+ }
+
+
+
+ /**
* {@inheritDoc}
*/
+ @Override
public String toString()
{
- StringBuilder builder = new StringBuilder();
- builder.append("Change(modificationType=");
+ final StringBuilder builder = new StringBuilder();
+ builder.append("Modification(modificationType=");
builder.append(modificationType);
builder.append(", attributeDescription=");
builder.append(attribute.getAttributeDescriptionAsString());
builder.append(", attributeValues={");
boolean firstValue = true;
- for (ByteString value : attribute)
+ for (final ByteString value : attribute)
{
if (!firstValue)
{
--
Gitblit v1.10.0