Subtag implements Serializable, Cloneable,
		Comparable<Subtag> { public boolean isDeprecated() { switch (type) { case PRIMARY: { Language e = getEnum(); return e.isDeprecated(); } case SCRIPT: { Script e = getEnum(); return e.isDeprecated(); } case REGION: { Region e = getEnum(); return e.isDeprecated(); } case VARIANT: { Variant e = getEnum(); return e.isDeprecated(); } case EXTLANG: { Extlang e = getEnum(); return e.isDeprecated(); } case SINGLETON: { Singleton e = getEnum(); return e.isDeprecated(); } default: return false; } } 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 testIsDeprecated() { assertFalse(new Subtag().isDeprecated()); for (Language lang : Language.values()) { Subtag subtag = lang.newSubtag(); assertEquals(subtag.isDeprecated(), lang.isDeprecated()); } for (Script script : Script.values()) { Subtag subtag = script.newSubtag(); assertEquals(subtag.isDeprecated(), script.isDeprecated()); } for (Region region : Region.values()) { Subtag subtag = region.newSubtag(); assertEquals(subtag.isDeprecated(), region.isDeprecated()); } for (Variant variant : Variant.values()) { Subtag subtag = variant.newSubtag(); assertEquals(subtag.isDeprecated(), variant.isDeprecated()); } for (Singleton singleton : Singleton.values()) { Subtag subtag = singleton.newSubtag(); assertEquals(subtag.isDeprecated(), singleton.isDeprecated()); } }