org.organicdesign.fp.collections.AbstractUnmodIterable Maven / Gradle / Ivy
package org.organicdesign.fp.collections;
/**
Implements equals and hashCode() methods compatible with all java.util collections (this
algorithm is not order-dependent) and toString which takes the name of the sub-class.
*/
public abstract class AbstractUnmodIterable implements UnmodIterable {
@Override public int hashCode() { return UnmodIterable.hash(this); }
@Override public String toString() {
return UnmodIterable.toString(getClass().getSimpleName(), this);
}
}