java.lang.Object
com.nomagic.magicdraw.uml.symbols.layout.sequence.NameSequencer
All Implemented Interfaces:
Sequencer, Comparator<ShapeElement>
Direct Known Subclasses:
NumberingSequencer

@OpenApiAll public class NameSequencer extends Object implements Sequencer
Alphanumeric sequencer. Sorts alphabetically (uses the same sorting comparator as containment tree)
  • Field Details

    • NAME

      public static final String NAME
  • Constructor Details

    • NameSequencer

      public NameSequencer()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Sequencer
      The name of the sequencer
      Specified by:
      getName in interface Sequencer
      Returns:
      sequencer name
    • compare

      public int compare(ShapeElement shape1, ShapeElement shape2)
      Specified by:
      compare in interface Comparator<ShapeElement>
      Specified by:
      compare in interface Sequencer
    • compareStrings

      protected int compareStrings(@CheckForNull String string1, @CheckForNull String string2)
      Compares two strings alphanumerically. Empty strings are placed at the end. Null values are translated into empty strings.
      Parameters:
      string1 - first string
      string2 - second string
      Returns:
      compare result