Class NameSequencer
java.lang.Object
com.nomagic.magicdraw.uml.symbols.layout.sequence.NameSequencer
- All Implemented Interfaces:
Sequencer
,Comparator<ShapeElement>
- Direct Known Subclasses:
NumberingSequencer
Alphanumeric sequencer. Sorts alphabetically (uses the same sorting comparator as containment tree)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(ShapeElement shape1, ShapeElement shape2) protected int
compareStrings
(String string1, String string2) Compares two strings alphanumerically.getName()
The name of the sequencerMethods 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
-
Field Details
-
NAME
-
-
Constructor Details
-
NameSequencer
public NameSequencer()
-
-
Method Details
-
getName
Description copied from interface:Sequencer
The name of the sequencer -
compare
- Specified by:
compare
in interfaceComparator<ShapeElement>
- Specified by:
compare
in interfaceSequencer
-
compareStrings
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
-