equivalence operator
some sample codes on generics