public enum XmlAttributeSortOrder extends java.lang.Enum<XmlAttributeSortOrder>
Enum Constant and Description |
---|
ALPHABETICAL |
LOGICAL |
NO_SORTING |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
key |
Modifier and Type | Method and Description |
---|---|
static int |
compareAttributes(java.lang.String name1,
java.lang.String name2)
Returns
Comparator values for ordering attributes in the following
order:
id
style
layout_width
layout_height
other layout params, sorted alphabetically
other attributes, sorted alphabetically
|
static int |
compareAttributes(java.lang.String prefix1,
java.lang.String name1,
java.lang.String prefix2,
java.lang.String name2)
Returns
Comparator values for ordering attributes in the following
order:
id
style
layout_width
layout_height
other layout params, sorted alphabetically
other attributes, sorted alphabetically, first by namespace, then by name
|
java.util.Comparator<org.w3c.dom.Attr> |
getAttributeComparator() |
static XmlAttributeSortOrder |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static XmlAttributeSortOrder[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final XmlAttributeSortOrder NO_SORTING
public static final XmlAttributeSortOrder ALPHABETICAL
public static final XmlAttributeSortOrder LOGICAL
public static XmlAttributeSortOrder[] values()
for (XmlAttributeSortOrder c : XmlAttributeSortOrder.values()) System.out.println(c);
public static XmlAttributeSortOrder valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@Nullable public java.util.Comparator<org.w3c.dom.Attr> getAttributeComparator()
public static int compareAttributes(java.lang.String name1, java.lang.String name2)
Comparator
values for ordering attributes in the following
order:
name1
- the first attribute name to comparename2
- the second attribute name to comparepublic static int compareAttributes(@Nullable java.lang.String prefix1, @NonNull java.lang.String name1, @Nullable java.lang.String prefix2, @NonNull java.lang.String name2)
Comparator
values for ordering attributes in the following
order:
prefix1
- the namespace prefix, if any, of name1
name1
- the first attribute name to compareprefix2
- the namespace prefix, if any, of name2
name2
- the second attribute name to compare