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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(ShapeElement shape1, ShapeElement shape2) protected intcompareStrings(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, waitMethods 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:SequencerThe name of the sequencer -
compare
- Specified by:
comparein interfaceComparator<ShapeElement>- Specified by:
comparein 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
-