equal
deleted
inserted
replaced
872 "return the number of set elements" |
872 "return the number of set elements" |
873 |
873 |
874 ^ tally |
874 ^ tally |
875 ! ! |
875 ! ! |
876 |
876 |
|
877 |
877 !Set methodsFor:'set operations'! |
878 !Set methodsFor:'set operations'! |
878 |
879 |
879 - aCollection |
880 - aCollection |
880 "return a new set containing all elements of the receiver, which are |
881 "return a new set containing all elements of the receiver, which are |
881 NOT also contained in the argument collection" |
882 NOT also contained in the argument collection" |
906 ! |
907 ! |
907 |
908 |
908 includes:anObject |
909 includes:anObject |
909 "return true if the argument anObject is in the receiver" |
910 "return true if the argument anObject is in the receiver" |
910 |
911 |
|
912 anObject isNil ifTrue:[ |
|
913 'Set [warning]: nil is not a valid element - will be an error in later versions' errorPrintCR. |
|
914 ^ false |
|
915 ]. |
911 ^ (self find:anObject ifAbsent:0) ~~ 0 |
916 ^ (self find:anObject ifAbsent:0) ~~ 0 |
912 ! |
917 ! |
913 |
918 |
914 isEmpty |
919 isEmpty |
915 "return true if the receiver is empty" |
920 "return true if the receiver is empty" |
984 ! ! |
989 ! ! |
985 |
990 |
986 !Set class methodsFor:'documentation'! |
991 !Set class methodsFor:'documentation'! |
987 |
992 |
988 version |
993 version |
989 ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.65 2000-08-22 13:57:23 cg Exp $' |
994 ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.66 2000-08-30 21:24:57 cg Exp $' |
990 ! ! |
995 ! ! |
991 Set initialize! |
996 Set initialize! |