ScriptableObject.KeyComparator (rhino 1.7.15 API)

Package org.mozilla.javascript

## Class ScriptableObject.KeyComparator

- java.lang.Object
- - org.mozilla.javascript.ScriptableObject.KeyComparator

- All Implemented Interfaces:
    `java.io.Serializable`, `java.util.Comparator<java.lang.Object>`
  Enclosing class:
    ScriptableObject

      public static final class ScriptableObject.KeyComparator
      extends java.lang.Object
      implements java.util.Comparator<java.lang.Object>, java.io.Serializable

  This comparator sorts property fields in spec-compliant order. Numeric ids first, in numeric order, followed by string ids, in insertion order. Since this class already keeps string keys in insertion-time order, we treat all as equal. The "Arrays.sort" method will then not change their order, but simply move all the numeric properties to the front, since this method is defined to be stable.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `KeyComparator()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `compare​(java.lang.Object o1, java.lang.Object o2)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### KeyComparator

          public KeyComparator()

  - ### Method Detail

    - #### compare

          public int compare​(java.lang.Object o1,
                             java.lang.Object o2)

      Specified by:
        `compare` in interface `java.util.Comparator<java.lang.Object>`