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

Jean-Noel Rouvignac
15.17.2014 6870993d12bf8a2b9d5cd103dc5ccabc42f9bf5d
opendj-config/src/main/java/org/forgerock/opendj/config/client/spi/PropertySet.java
@@ -51,16 +51,16 @@
     */
    private static final class MyProperty<T> implements Property<T> {
        // The active set of values.
        /** The active set of values. */
        private final SortedSet<T> activeValues;
        // The definition associated with this property.
        /** The definition associated with this property. */
        private final PropertyDefinition<T> d;
        // The default set of values (read-only).
        /** The default set of values (read-only). */
        private final SortedSet<T> defaultValues;
        // The pending set of values.
        /** The pending set of values. */
        private final SortedSet<T> pendingValues;
        /**
@@ -97,25 +97,19 @@
            activeValues.addAll(pendingValues);
        }
        /**
         * {@inheritDoc}
         */
        /** {@inheritDoc} */
        @Override
        public SortedSet<T> getActiveValues() {
            return Collections.unmodifiableSortedSet(activeValues);
        }
        /**
         * {@inheritDoc}
         */
        /** {@inheritDoc} */
        @Override
        public SortedSet<T> getDefaultValues() {
            return defaultValues;
        }
        /**
         * {@inheritDoc}
         */
        /** {@inheritDoc} */
        @Override
        public SortedSet<T> getEffectiveValues() {
            SortedSet<T> values = getPendingValues();
@@ -127,33 +121,25 @@
            return values;
        }
        /**
         * {@inheritDoc}
         */
        /** {@inheritDoc} */
        @Override
        public SortedSet<T> getPendingValues() {
            return Collections.unmodifiableSortedSet(pendingValues);
        }
        /**
         * {@inheritDoc}
         */
        /** {@inheritDoc} */
        @Override
        public PropertyDefinition<T> getPropertyDefinition() {
            return d;
        }
        /**
         * {@inheritDoc}
         */
        /** {@inheritDoc} */
        @Override
        public boolean isEmpty() {
            return pendingValues.isEmpty();
        }
        /**
         * {@inheritDoc}
         */
        /** {@inheritDoc} */
        @Override
        public boolean isModified() {
            if (activeValues.size() == pendingValues.size() && activeValues.containsAll(pendingValues)) {
@@ -173,24 +159,20 @@
            pendingValues.addAll(c);
        }
        /**
         * {@inheritDoc}
         */
        /** {@inheritDoc} */
        @Override
        public String toString() {
            return getEffectiveValues().toString();
        }
        /**
         * {@inheritDoc}
         */
        /** {@inheritDoc} */
        @Override
        public boolean wasEmpty() {
            return activeValues.isEmpty();
        }
    }
    // The properties.
    /** The properties. */
    private final Map<PropertyDefinition<?>, MyProperty<?>> properties;
    /**
@@ -240,9 +222,7 @@
        return (Property<T>) properties.get(d);
    }
    /**
     * {@inheritDoc}
     */
    /** {@inheritDoc} */
    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();