Source Code

A module for collections.

You can find here the following mutable collection types:

Along with concrete implementations for each:

By: Stéphane Épardaud
License: Apache Software License
Packages
ceylon.collection
Functions
groupSource Code
shared Map<Group,{Element+}> group<Group, Element>({Element*} elements, Group grouping(Element element))
given Group satisfies Object

Creates a Map that contains the Iterable's

elements, grouped in `Sequence`s under the
keys provided by the grouping function.
Parameters:
  • grouping

    A function that returns the key under which to group the specified element.

Interfaces
MutableListSource Code
shared MutableList<Element>

A List supporting addition, insertion, removal, and mutation of its elements.

MutableMapSource Code
shared MutableMap<Key,Item>

A Map supporting addition of new entries and removal of existing entries.

MutableSetSource Code
shared MutableSet<Element>

A Set supporting addition of new elements and removal of existing elements.

Classes
HashMapSource Code
shared HashMap<Key,Item>

A MutableMap implemented as a hash map stored in an Array of singly linked lists of entries. The hash code of a key is defined by hash.

HashSetSource Code
shared HashSet<Element>

A MutableSet implemented as a hash set stored in an Array of singly linked lists. The hash code of an element is defined by hash.

LinkedListSource Code
shared LinkedList<Element>

A MutableList implemented as a singly linked list.