functionaljava/functionaljava — Issue #14: Provide equals/hashCode/toString for fj.List<A>
Author: samreid
Created: 2012-03-05 22:47:05+00:00
State: open

fj.List should provide a default implementation of equals, hashCode and toString that uses the .equals(), .hashCode() and .toString() implementations of its members. For instance, this equality check on the same list contents currently fails:

public class TestList {
public static void main( String[] args ) {
final java.util.List myList = Arrays.asList( 1, 2, 3 );
boolean equal = iterableList( myList ).equals( iterableList( myList ) );
System.out.println( "equal = " + equal );//prints false
}
} `

Discussion of this topic was provided here:
https://groups.google.com/forum/?fromgroups#!topic/functionaljava/qc5fUHOg0AU