/** Overridden for the same reason than {@link AbstractMap#equals(Object). */ @Override public boolean equals(final Object object) { if (object == this) { return true; } if (!(object instanceof Set<?>)) { return false; } final Set<?> that = (Set<?>) object; final EntryIterator<K,V> it = entryIterator(); if (it == null) { return that.isEmpty(); } int size = 0; while (it.next()) { if (!that.contains(it.getEntry())) { return false; } size++; } return size == that.size(); } };
/** Overridden for the same reason than {@link AbstractMap#equals(Object). */ @Override public boolean equals(final Object object) { if (object == this) { return true; } if (!(object instanceof Set<?>)) { return false; } final Set<?> that = (Set<?>) object; final EntryIterator<K,V> it = entryIterator(); if (it == null) { return that.isEmpty(); } int size = 0; while (it.next()) { if (!that.contains(it.getEntry())) { return false; } size++; } return size == that.size(); } };
@Override public Entry<K,V> next() {return entry().getEntry();} }
@Override public Entry<K,V> next() {return entry().getEntry();} }