Guava style collections for Ceylon, backed by Guava.
The goal of this project is to create a good Ceylon library with the help of Guava, and not to attempt to expose all of Guava in Ceylon.
Fortunately, Guava's collections framework works very well with Ceylon's
language features and standard library. In fact, Guava collections arguably
present themselves much better in Ceylon than in their native Java due to
Ceylon's declaration site variance and flexible base collections interfaces
including Iterable
, Collection
, and Correspondence
.
- Immutable types including
ImmutableList
,ImmutableSet
,ImmutableMap
, and others. All immutable types have corresponding builder classes, such asImmutableListBuilder
. BiMap
types, which areMap<Key, Item>
s that are indexed on bothKey
andItem
, with an available inverse view providing aMap<Item, Key>
.Multimap
types, which areCollection
s ofKey->Item
s andCorrespondence
s of keys toCollection<Item>
s.ListMultimap
,SetMultimap
, andTreeMultimap
are important variations.Multiset
types, which are efficientCollection
s of elements, where each element may occur more than once.
See Guava's Documentation for detailed overview of Guava's Collections.
This library may be expanded to cover other areas of Guava. One package that
might be interesting is com.google.common.cache
(well, yeah, that's a bit
collections-like too). But much of Guava is either Java specific or can easily
be used directly from Ceylon without wrappers.
Initial implementations of several collection types are working, but are missing some functionality such as mutable views.
The latest version is available on Ceylon Herd.
The content of this repository is released under the ASL v2.0 as provided in the LICENSE file that accompanied this code.
By submitting a "pull request" or otherwise contributing to this repository, you agree to license your contribution under the license mentioned above.