Subtag implements Serializable, Cloneable,
		Comparable<Subtag> { public int compareTo(Subtag o) { int c = o.type.compareTo(type); return c != 0 ? c : o.name.compareTo(name); } Subtag(Language language);  Subtag(Script script);  Subtag(Region region);  Subtag(Variant variant);  Subtag(Extlang extlang);  Subtag(Singleton singleton);  Subtag(Type type, String name);   Subtag();  Subtag(Type type, String name, Subtag prev);   Subtag(Type type, String name, Subtag prev, Subtag next); Type getType(); String getName(); Subtag getPrevious(); Subtag getNext(); String toString(); int hashCode(); boolean equals(Object obj); Subtag clone(); boolean isDeprecated(); @SuppressWarnings("unchecked") T getEnum(); boolean isValid(); Subtag canonicalize(); static Subtag newWildcard(); int compareTo(Subtag o);  }
@Test public void testCompareTo() { Subtag lang1 = new Subtag(Language.DE); Subtag lang2 = new Subtag(Language.DE); Subtag lang3 = new Subtag(Language.EN); Subtag region = new Subtag(Region.DE); assertTrue(0 == lang1.compareTo(lang1)); assertTrue(0 == lang1.compareTo(lang2)); assertTrue(lang1.compareTo(lang3) > 0); assertTrue(lang3.compareTo(lang1) < 0); assertTrue(lang1.compareTo(region) > 0); assertTrue(region.compareTo(lang1) < 0); }