javolution.util.package-info Maven / Gradle / Ivy
/**
High-performance collection classes with {@link javolution.lang.Realtime
worst case execution time behavior} documented.
Whereas Java current evolution leads to more and more classes being parts of
the standard library; Javolution approach is quite the opposite. It aims to
provide only the quintessential classes from which all others can be derived.
FAQ:
- Does Javolution provide immutable collections similar to
the ones provided by Scala or .NET ?
Using Javolution you may return an {@link javolution.lang.Immutable Immutable}
reference (const reference) over any object which cannot be modified including collections or maps.
[code]
public class UnitSystem {
Set units;
public UnitSystem(Immutable> units) {
this.units = units.value(); // Defensive copy unnecessary (immutable)
}
}
...
Immutable> unitsMKSA = new FastSet().addAll(M, K, S, A).toImmutable();
UnitSystem MKSA = new UnitSystem(unitsMKSA);
[/code]
*/
package javolution.util;