org.springframework.batch.core.job.flow.support

## Class DefaultStateTransitionComparator

- java.lang.Object
- - org.springframework.batch.core.job.flow.support.DefaultStateTransitionComparator

- All Implemented Interfaces:
    java.util.Comparator<StateTransition>

      public class DefaultStateTransitionComparator
      extends java.lang.Object
      implements java.util.Comparator<StateTransition>

  Sorts by decreasing specificity of pattern, based on just counting wildcards (with * taking precedence over ?). If wildcard counts are equal then falls back to alphabetic comparison. Hence * > foo* > ??? > fo? > foo.
  Since:
    3.0
  Author:
    Michael Minella
  See Also:
    `Comparator`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `STATE_TRANSITION_COMPARATOR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultStateTransitionComparator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(StateTransition arg0, StateTransition arg1)`

    - ### 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

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Field Detail

    - #### STATE_TRANSITION_COMPARATOR

          public static final java.lang.String STATE_TRANSITION_COMPARATOR

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DefaultStateTransitionComparator

          public DefaultStateTransitionComparator()

  - ### Method Detail

    - #### compare

          public int compare(StateTransition arg0,
                             StateTransition arg1)

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