Library providing general-purpose mutable lists, sets, and maps.
The following interfaces define abstract mutable collection types:
MutableList
is a mutable List
,MutableSet
is a mutable Set
, andMutableMap
is a mutable Map
.These interfaces define abstract sorted collection types:
In addition, dedicated Stack
and Queue
interfaces
are defined, representing specialized kinds of lists.
These concrete implementations are provided:
ArrayList
is a MutableList
implemented using an
Array
.LinkedList
is a MutableList
implemented using a
singly-linked list.PriorityQueue
is a Queue
implemented using an
Array
where the front of the queue is the smallest elementHashSet
is a mutable hash set implemented using an
Array
of singly-linked lists.HashMap
is a mutable hash map implemented using an
Array
of singly-linked lists of Entry
s.TreeSet
is a mutable SortedSet
implemented using a
red/black binary tree.TreeMap
is a mutable SortedMap
implemented using a
red/black binary tree.The functions unmodifiableList()
, unmodifiableSet()
,
and unmodifiableMap()
may be used to hide these mutable
list, set, and map implementations from clients.
SingletonMap
and SingletonSet
are immutable
collections with exactly one element.
Finally, IdentitySet
and IdentityMap
are mutable
collections based on identity instead of
value equality.
Packages | |
ceylon.collection |
Values | |
linked | Source Codeshared linked linked |
unlinked | Source Codeshared unlinked unlinked |
Functions | |
frequencies | Source Codeshared Map<Element,Integer> frequencies<Element>({Element*} elements) |
group | Source Codeshared Map<Group,[Element+]> group<Group, Element>({Element*} elements, Group grouping(Element element)) Produces a |
naturalOrderTreeMap | Source Codeshared TreeMap<Key,Item> naturalOrderTreeMap<Key, Item>({<Key->Item>*} entries) Create a |
naturalOrderTreeSet | Source Codeshared TreeSet<Element> naturalOrderTreeSet<Element>({Element*} entries) Create a |
partition | Source Codeshared Element[][2] partition<Element>({Element*} elements, Boolean selecting(Element element)) Groups the given |
unmodifiableList | Source Codeshared List<Element> unmodifiableList<Element>(List<Element> list) Wrap the given |
unmodifiableMap | Source Codeshared Map<Key,Item> unmodifiableMap<Key, Item>(Map<Key,Item> map) Wrap the given |
unmodifiableSet | Source Codeshared Set<Element> unmodifiableSet<Element>(Set<Element> set) Wrap the given |
Interfaces | |
ListMutator | Source Codeshared ListMutator<in Element> Protocol for mutation of a |
MapMutator | Source Codeshared MapMutator<in Key,in Item> Protocol for mutation of a |
MutableList | Source Codeshared MutableList<Element> A |
MutableMap | Source Codeshared MutableMap<Key,Item> A |
MutableSet | Source Codeshared MutableSet<Element> A |
Queue | Source Codeshared Queue<Element> Abstract supertype of datastructures that can be used as FIFO queues. A Note that many |
SetMutator | Source Codeshared SetMutator<in Element> Protocol for mutation of a |
SortedMap | Source Codeshared SortedMap<Key,out Item> A |
SortedSet | Source Codeshared SortedSet<Element> A |
Stack | Source Codeshared Stack<Element> Abstract supertype of datastructures that can be used as LIFO stacks. A Note that many |
Classes | |
ArrayList | Source Codeshared ArrayList<Element> A
The size of the backing |
HashMap | Source Codeshared HashMap<Key,Item> A The
The management of the backing array is controlled by the
given |
HashSet | Source Codeshared HashSet<Element> A The
The management of the backing array is controlled by the
given |
Hashtable | Source Codeshared Hashtable Performance-related settings for a hashtable based
collection like The size of the backing
|
IdentityMap | Source Codeshared IdentityMap<Key,Item> An identity map implemented as a hash map stored in an
|
IdentitySet | Source Codeshared IdentitySet<Element> An identity set implemented as a hash set stored in an
|
LinkedList | Source Codeshared LinkedList<Element> A |
PriorityQueue | Source Codeshared PriorityQueue<Element> A The size of the backing |
SingletonMap | Source Codeshared SingletonMap<Key,Item> A |
SingletonSet | Source Codeshared SingletonSet<Element> A |
Stability | Source Codeshared abstract Stability |
TreeMap | Source Codeshared TreeMap<Key,Item> A |
TreeSet | Source Codeshared TreeSet<Element> A |
linked | Source Codeshared linked |
unlinked | Source Codeshared unlinked |