Class NameSequencer
- java.lang.Object
-
- com.nomagic.magicdraw.uml.symbols.layout.sequence.NameSequencer
-
- All Implemented Interfaces:
Sequencer
,java.util.Comparator<ShapeElement>
- Direct Known Subclasses:
NumberingSequencer
@OpenApiAll public class NameSequencer extends java.lang.Object implements Sequencer
Alphanumeric sequencer. Sorts alphabetically (uses the same sorting comparator as containment tree)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
-
Constructor Summary
Constructors Constructor Description NameSequencer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(ShapeElement shape1, ShapeElement shape2)
protected int
compareStrings(java.lang.String string1, java.lang.String string2)
Compares two strings alphanumerically.java.lang.String
getName()
The name of the sequencer
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:Sequencer
The name of the sequencer
-
compare
public int compare(ShapeElement shape1, ShapeElement shape2)
- Specified by:
compare
in interfacejava.util.Comparator<ShapeElement>
- Specified by:
compare
in interfaceSequencer
-
compareStrings
protected int compareStrings(@CheckForNull java.lang.String string1, @CheckForNull java.lang.String string2)
Compares two strings alphanumerically. Empty strings are placed at the end. Null values are translated into empty strings.- Parameters:
string1
- first stringstring2
- second string- Returns:
- compare result
-
-