You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2016/09/20 23:29:47 UTC

logging-log4j2 git commit: Sort methods.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 436416b99 -> 0a172f200


Sort methods.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/0a172f20
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/0a172f20
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/0a172f20

Branch: refs/heads/master
Commit: 0a172f200becfa35692f5a3b357b130d69f5015d
Parents: 436416b
Author: Gary Gregory <gg...@apache.org>
Authored: Tue Sep 20 16:29:44 2016 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Tue Sep 20 16:29:44 2016 -0700

----------------------------------------------------------------------
 .../logging/log4j/spi/MutableContextData.java   | 76 ++++++++++----------
 1 file changed, 38 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0a172f20/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextData.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextData.java b/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextData.java
index 346ea35..22c6be1 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextData.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/spi/MutableContextData.java
@@ -37,26 +37,56 @@ public interface MutableContextData extends ContextData {
     void clear();
 
     /**
-     * Puts the specified key-value pair into the collection.
-     *
-     * @param key the key to add or remove. Keys may be {@code null}.
-     * @param value the value to add. Values may be {@code null}.
+     * Indicates whether some other object is "equal to" this one.
+     * 
+     * @param obj
+     *            the reference object with which to compare.
+     * @return {@code true} if this object is the same as the obj argument; {@code false} otherwise.
+     * @see #hashCode()
+     */
+    @Override
+    boolean equals(final Object obj);
+
+    /**
+     * Makes this collection immutable. Attempts to modify the collection after the {@code freeze()} method was called
+     * will result in an {@code UnsupportedOperationException} being thrown.
+     */
+    void freeze();
+
+    /**
+     * Returns a hash code value for the object.
+     * @return a hash code value for this object.
+     */
+    @Override
+    int hashCode();
+
+    /**
+     * Returns {@code true} if this object has been {@linkplain #freeze() frozen}, {@code false} otherwise.
+     * @return  {@code true} if this object has been {@linkplain #freeze() frozen}, {@code false} otherwise
+     */
+    boolean isFrozen();
+
+    /**
+     * Copy all key-value pairs from the specified {@code ContextData} into this {@code MutableContextData}.
+     * @param source the {@code ContextData} to copy key-value pairs from
      * @throws java.util.ConcurrentModificationException some implementations may not support structural modifications
      *          to this context data while iterating over the contents with {@link #forEach(BiConsumer)} or
      *          {@link #forEach(TriConsumer, Object)}.
      * @throws UnsupportedOperationException if this collection has been {@linkplain #isFrozen() frozen}.
      */
-    void putValue(final String key, final Object value);
+    void putAll(final ContextData source);
 
     /**
-     * Copy all key-value pairs from the specified {@code ContextData} into this {@code MutableContextData}.
-     * @param source the {@code ContextData} to copy key-value pairs from
+     * Puts the specified key-value pair into the collection.
+     *
+     * @param key the key to add or remove. Keys may be {@code null}.
+     * @param value the value to add. Values may be {@code null}.
      * @throws java.util.ConcurrentModificationException some implementations may not support structural modifications
      *          to this context data while iterating over the contents with {@link #forEach(BiConsumer)} or
      *          {@link #forEach(TriConsumer, Object)}.
      * @throws UnsupportedOperationException if this collection has been {@linkplain #isFrozen() frozen}.
      */
-    void putAll(final ContextData source);
+    void putValue(final String key, final Object value);
 
     /**
      * Removes the key-value pair for the specified key from this context data collection.
@@ -68,34 +98,4 @@ public interface MutableContextData extends ContextData {
      * @throws UnsupportedOperationException if this collection has been {@linkplain #isFrozen() frozen}.
      */
     void remove(final String key);
-
-    /**
-     * Makes this collection immutable. Attempts to modify the collection after the {@code freeze()} method was called
-     * will result in an {@code UnsupportedOperationException} being thrown.
-     */
-    void freeze();
-
-    /**
-     * Returns {@code true} if this object has been {@linkplain #freeze() frozen}, {@code false} otherwise.
-     * @return  {@code true} if this object has been {@linkplain #freeze() frozen}, {@code false} otherwise
-     */
-    boolean isFrozen();
-
-    /**
-     * Returns a hash code value for the object.
-     * @return a hash code value for this object.
-     */
-    @Override
-    int hashCode();
-
-    /**
-     * Indicates whether some other object is "equal to" this one.
-     * 
-     * @param obj
-     *            the reference object with which to compare.
-     * @return {@code true} if this object is the same as the obj argument; {@code false} otherwise.
-     * @see #hashCode()
-     */
-    @Override
-    boolean equals(final Object obj);
 }
\ No newline at end of file