@Test public void toArray() { EnumeratedIdentitySet<Element> set = new EnumeratedIdentitySet<>(elements); Object[] array = set.toArray(); Element[] array2 = set.toArray(new Element[0]); assertTrue(set.containsAll(Arrays.asList(array))); assertTrue(containsAllSame(Arrays.asList(array), set)); assertTrue(containsAllSame(Arrays.asList(array2), set)); }
@Override public Object[] toArray() { return set.keySet().toArray(); }
EnumeratedIdentitySet implements Set<T> { @Override public Object[] toArray() { return set.keySet().toArray(); } }
EnumeratedIdentitySet implements Set<T> { @Override public Object[] toArray() { return set.keySet().toArray(); } EnumeratedIdentitySet(Collection<? extends T> collection);  EnumeratedIdentitySet(); }
EnumeratedIdentitySet implements Set<T> { @Override public Object[] toArray() { return set.keySet().toArray(); } EnumeratedIdentitySet(Collection<? extends T> collection);  EnumeratedIdentitySet(); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override Iterator<T> iterator(); @Override Object[] toArray(); @Override T1[] toArray(T1[] a); @Override boolean add(T t); @Override boolean remove(Object o); @Override boolean containsAll(Collection<?> c); @Override boolean addAll(Collection<? extends T> collection); @Override boolean retainAll(Collection<?> collection); @Override boolean removeAll(Collection<?> collection); @Override void clear(); List<T> insertionOrderedList(); }
EnumeratedIdentitySet implements Set<T> { @Override public Object[] toArray() { return set.keySet().toArray(); } EnumeratedIdentitySet(Collection<? extends T> collection);  EnumeratedIdentitySet(); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override Iterator<T> iterator(); @Override Object[] toArray(); @Override T1[] toArray(T1[] a); @Override boolean add(T t); @Override boolean remove(Object o); @Override boolean containsAll(Collection<?> c); @Override boolean addAll(Collection<? extends T> collection); @Override boolean retainAll(Collection<?> collection); @Override boolean removeAll(Collection<?> collection); @Override void clear(); List<T> insertionOrderedList();  }