J
Jacek
this is what System.out.println tells me:
C={[<val=M;col=2>, <val=2000;col=1>, <val=40;col=0>]=0},
s=[<val=M;col=2>, <val=2000;col=1>, <val=40;col=0>],
C.containsKey(s)=false
C is a Map, where key is a SortedSet which consists of objects of class
Element implements Comparable.
s is a SortedSet which consists of objects of class Element implements
Comparable.
I thought that C.containsKey(s) would return true in this case...
I looked to API - containsKey "Returns true if this map contains a mapping
for the specified key"
is it possible that C.containsKey(s) returns false, because it contains a
different object of the same class with the same values?
maybe you know where's my problem...
Thanks for any help
C={[<val=M;col=2>, <val=2000;col=1>, <val=40;col=0>]=0},
s=[<val=M;col=2>, <val=2000;col=1>, <val=40;col=0>],
C.containsKey(s)=false
C is a Map, where key is a SortedSet which consists of objects of class
Element implements Comparable.
s is a SortedSet which consists of objects of class Element implements
Comparable.
I thought that C.containsKey(s) would return true in this case...
I looked to API - containsKey "Returns true if this map contains a mapping
for the specified key"
is it possible that C.containsKey(s) returns false, because it contains a
different object of the same class with the same values?
maybe you know where's my problem...
Thanks for any help