Supertype:
Object
Table 9. Operations
Return type | Name | Description |
---|---|---|
Boolean
|
contains
(
Object
)
|
returns true if this collection contains the specified object. otherwise false. returns this Collection. |
List
|
toList
()
|
converts this collection to List |
Set
|
toSet
()
|
converts this collection to Set |
List
|
flatten
()
|
returns a flattened List. |
Set
|
intersect
(
Collection
)
|
returns a new Set, containing only the elements contained in this and the specified Collection |
String
|
toString
(
String
)
|
concatenates each contained element (using toString()), separated by the specified String. |
Collection
|
removeAll
(
Collection
)
|
removes all elements contained in the specified collection from this Collection if contained (modifies it!). returns this Collection. |
Collection
|
remove
(
Object
)
|
removes the specified element from this Collection if contained (modifies it!). returns this Collection. |
Set
|
without
(
Collection
)
|
returns a new Set, containing all elements from this Collection without the elements from specified Collection |
Collection
|
addAll
(
Collection
)
|
adds all elements to the Collection (modifies it!). returns this Collection. |
Collection
|
add
(
Object
)
|
adds an element to the Collection (modifies it!). returns this Collection. |
Set
|
union
(
Collection
)
|
returns a new Set, containing all elements from this and the specified Collection |
Boolean
|
containsAll
(
Collection
)
|
returns true if this collection contains each element contained in the specified collection. otherwise false. returns this Collection. |