Index - All Packages - All Categories - All Classes

Class ImmuSet

ImmuSets are ScruSets which are guaranteed never to change. ImmuSets correspond to the mathematical notion of a finite set of elements, except of course that here the elements can be any valid X++ object. Just like mathematical sets, two are equal (according to isEqual) iff they have the same elements. Just because the set cannot change, that doesn't prevent any of the members from undergoing state change.

ImmuSets implement some additional protocol to make new sets out of old ones according to the familiar set theoretic operators (like intersect). XuRegions are much like ImmuSets of Positions except that they aren't necessarily finite or even enumerable. XuRegions implement a similar protocol, but aren't polymorphic with ImmuSets.

Package: Udanax-Gold
All Superclasses: Object Heaper ScruSet
Immediate Subclasses: EmptyImmuSet ImmuSetOnMu TinyImmuSet
Protocols: Object
Categories: Xanadu-Collection-Sets

Class Methods

createMuSet: ms


from: set

This is for ImmuSet subclasses to produce results from temporary MuSets.
The difference between this and ImmuSet makeMuSet: is that this doesn't make a copy
of the MuSet when making an ImmuSetOnMu.

initTimeNonInherited


linkTimeNonInherited


make


make: thing



Overridden by: ImmuSetOnMu class TinyImmuSet class

makeHeaper: aSingleton


makeMuSet: set


newWith: value

A single element ImmuSet

with: value

A single element ImmuSet

Instance Methods

actualHashForEqual



Overrides: ScruSet

asImmuSet



Overrides: ScruSet

asMuSet



Overrides: ScruSet
Overridden by: EmptyImmuSet ImmuSetOnMu TinyImmuSet

copy

don't need to actually make a copy, as this is immutable

Overrides: ScruSet

count



Overrides: ScruSet
Overridden by: EmptyImmuSet ImmuSetOnMu TinyImmuSet

hasMember: someone



Overrides: ScruSet
Overridden by: EmptyImmuSet ImmuSetOnMu TinyImmuSet

intersect: another

Regular set intersection. Return an ImmuSet containing only those objects which are members of
both sets

Overridden by: EmptyImmuSet ImmuSetOnMu TinyImmuSet

isEmpty



Overrides: ScruSet
Overridden by: EmptyImmuSet ImmuSetOnMu TinyImmuSet

isEqual: other



Overrides: ScruSet

minus: another

Return an ImmuSet containing those of my members which aren't members of 'another'

Overridden by: EmptyImmuSet ImmuSetOnMu TinyImmuSet

stepper



Overrides: ScruSet
Overridden by: EmptyImmuSet ImmuSetOnMu TinyImmuSet

unionWith: another

Return an ImmuSet containing those objects with are members of either of us

Overridden by: EmptyImmuSet ImmuSetOnMu TinyImmuSet

with: anElement

'set->with (anElement)' means the same as 'set->unionWith (immuSet (anElement))'.
It returns an ImmuSet with all my members and having anElement as a member.
If anElement is a member of me, then the result is identical to me.

Overridden by: EmptyImmuSet ImmuSetOnMu TinyImmuSet

without: anElement

'set->without (anElement)' means the same as 'set->minus (immuSet (anElement))'.
It returns an ImmuSet with all my members except anElement. If anElement isn't already a member,
then the result is identical to me.

Overridden by: EmptyImmuSet ImmuSetOnMu TinyImmuSet


Index - All Packages - All Categories - All Classes