Class ScriptableObject.KeyComparator

java.lang.Object
org.mozilla.javascript.ScriptableObject.KeyComparator
All Implemented Interfaces:
Serializable, Comparator<Object>
Enclosing class:
ScriptableObject

public static final class ScriptableObject.KeyComparator extends Object implements Comparator<Object>, 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:
  • Constructor Details

    • KeyComparator

      public KeyComparator()
  • Method Details