kermeta::standard
Class Set[G] inherited from Collection[G]



A Set is a non-ordered collection that contains distinct elements
(with regards to the G.equals(Object) operation)

@CompilerIgnore "true"
@ScalaCompilerName "k2.standard.Set"

Method Summary
Void
add()


Overrides Collection[G].add(G)
Adds element to the Set if it is not already contained by the
Set, does nothing otherwise


           
OrderedSet[G]
asOrderedSet()


Overrides Collection[G].asOrderedSet()
Returns a new OrderedSet that contains all elements of current Set
More efficient version of OrderedSet[G].new.addAll(self)


           
Set[G]
asSet()


Overrides Collection[G].asSet()
Returns a new Set composed of all elements of current Set
More efficient version of Set[G].new.addAll(self)


           
Integer
count()


Overrides Collection[G].count(G)
Returns the number of instances of element in the Set


           
Boolean
equals(Object)


Overrides Object.equals(Object)
Returns a Boolean stating whether the provided element is equal to
the current Set
The provided element is equal to the current Set if:


  • it is not an OrderedColllection

  • it is a Collection (not necessarily a Set)

  • it contains exactly the same elements than the current Set,
    with the same multiplicity


           
Set[Object]
flatten()


Returns a new Set which content includes all non-Collection elements
of the current Set, and, for each Collection element of the current
Set, as many elements as the Collection contains
Duplicates are removed


           
Set[G]
intersection(Collection)


Returns a new Set corresponding to the intersection of the Set elements
with the current Set


           
Set[G]
minus(Set)


Returns a new Set corresponding to the difference between the
current Set and the Set elements, ie all elements contained by
the current Set that do not appear in the elements Set


           
Void
remove()


Overrides Collection[G].remove(G)
Removes the element from the Set if it is contained by the Set


           
OrderedSet[G]
sortedBy()


Returns an ordered set of the set elements sorted using the given comparator.
The comparator must return an integer n such that


  • n > 0 if the second [G] element is greater than the first

  • n == 0 if the second [G] element equals the first

  • n < 0 if the second [G] element is lower than the first


           
Set[G]
symmetricDifference(Set)


Returns a new Set which contents corresponds to the symmetric
difference between current Set and Set s, ie all elements of
each Set that do not appear in the other one


           
Set[G]
union(Set)


Returns a new Set corresponding to the union of the Set elements
with the current Set


           
Bag[G]
unionWithBag(Bag)


Returns a new Bag corresponding to the union of the Bag elements
with the current Set


           


Details of operations

add

Void add[()


Overrides Collection[G].add(G)
Adds element to the Set if it is not already contained by the
Set, does nothing otherwise

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;10504;10548"

asOrderedSet

OrderedSet[G] asOrderedSet[()


Overrides Collection[G].asOrderedSet()
Returns a new OrderedSet that contains all elements of current Set
More efficient version of OrderedSet[G].new.addAll(self)

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;12526;12577"

asSet

Set[G] asSet[()


Overrides Collection[G].asSet()
Returns a new Set composed of all elements of current Set
More efficient version of Set[G].new.addAll(self)

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;12299;12336"

count

Integer count[()


Overrides Collection[G].count(G)
Returns the number of instances of element in the Set

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;11303;11352"

equals

Boolean equals[(Object)


Overrides Object.equals(Object)
Returns a Boolean stating whether the provided element is equal to
the current Set
The provided element is equal to the current Set if:

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;11138;11193"

flatten

Set[Object] flatten[()


Returns a new Set which content includes all non-Collection elements
of the current Set, and, for each Collection element of the current
Set, as many elements as the Collection contains
Duplicates are removed

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;13072;13116"

intersection

Set[G] intersection[(Collection)


Returns a new Set corresponding to the intersection of the Set elements
with the current Set

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;11801;11869"

minus

Set[G] minus[(Set)


Returns a new Set corresponding to the difference between the
current Set and the Set elements, ie all elements contained by
the current Set that do not appear in the elements Set

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;12078;12132"

remove

Void remove[()


Overrides Collection[G].remove(G)
Removes the element from the Set if it is contained by the Set

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;10667;10714"

sortedBy

OrderedSet[G] sortedBy[()


Returns an ordered set of the set elements sorted using the given comparator.
The comparator must return an integer n such that

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;13498;13578"

symmetricDifference

Set[G] symmetricDifference[(Set)


Returns a new Set which contents corresponds to the symmetric
difference between current Set and Set s, ie all elements of
each Set that do not appear in the other one

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;12771;12832"

union

Set[G] union[(Set)


Returns a new Set corresponding to the union of the Set elements
with the current Set

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;11461;11515"

unionWithBag

Bag[G] unionWithBag[(Bag)


Returns a new Bag corresponding to the union of the Bag elements
with the current Set

@traceability_text_reference "file:/mnt/extradisk/builds/workspace/org.kermeta.language.library_master/org/kermeta/language/org.kermeta.language.library.standard/src/main/kmt/kermeta/standard/collections.kmt;11624;11685"