SubtagSet implements Serializable, Cloneable, Iterable<Subtag>,
		Comparable<SubtagSet> { public int hashCode() { final int prime = 31; int result = 1; for (Subtag tag : this) result = prime * result + tag.hashCode(); return result; } protected  SubtagSet(Subtag primary); String toString(); Iterator<Subtag> iterator(); boolean contains(Subtag subtag); boolean contains(String tag); boolean contains(String tag, Subtag.Type type); int length(); boolean isValid(); @SuppressWarnings("unused") int count(); Subtag get(int index); int hashCode(); boolean equals(Object obj); Subtag[] toArray(); List<Subtag> asList(); int compareTo(SubtagSet o);  }
@Test public void testHashCode() { Subtag lang1 = new Subtag(Language.DE); Subtag region1 = new Subtag(Region.DE); lang1.setNext(region1); ConcreteSubtagSet set1 = new ConcreteSubtagSet(lang1); Subtag lang2 = new Subtag(Language.DE); Subtag region2 = new Subtag(Region.DE); lang1.setNext(region2); ConcreteSubtagSet set2 = new ConcreteSubtagSet(lang2); assertEquals(new Integer(set1.hashCode()), new Integer(set1.hashCode())); assertEquals(new Integer(set2.hashCode()), new Integer(set2.hashCode())); }