mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

matthew_swift
28.47.2010 f2160f4bd1c8ac67e5a86a6710d431e8932877f9
sdk/src/org/opends/sdk/Modification.java
File was renamed from sdk/src/org/opends/sdk/Change.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)
      {