All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.utils.collect.4.0.0.source-code.module-info Maven / Gradle / Ivy

/**
 * Utils : Collect
 * 

* This package contains a number of unmodifiable collection classes * largely inspired of the immutable collections in * guava. Note that there * are some important differences: * *

    *
  • * All classes are made as simple as possible, only one implementation * per type (e.g. no special 1-entry set implementation). *
  • *
  • * Builder classes for map and set accepts duplicate values / duplicate * keys, and will handle them as a normal {@link java.util.Map} or * {@link java.util.Set} would. *
  • *
  • * The unmodifiable collections are not serializable, and if * forcefully serialized will always end up empty, and as new instances. * PS: The whole concept of serializable should be ditched in * my opinion. *
  • *
  • * Note that since the classes were more or less written from scratch, * I have taken the liberty of taking the general copyright of the * implementations, though lots of kudos to the Guava team for making * them in the first place, and more or less standardizing the interface * for immutable collections. Even Java uses these now... *
  • *
* * Still there are a number of similarities, though these were not always explicitly * stated as features in Guava: * *
    *
  • * The list sets and maps still require all values to be non-null. *
  • *
  • * The {@link net.morimekta.collect.UnmodifiableSet} and * {@link net.morimekta.collect.UnmodifiableMap} classes will always * preserve input order when iterating. *
  • *
  • * Constructors will try to reuse the same instance and backing instances * as much as possible, with the limitations of local knowledge. *
  • *
* * The classes implemented here have been made to be compact and fast, not to * be functional utilities. Still there are some utility methods added, one * to make all collections into lists, and one to make maps explicitly ordered. * See {@link net.morimekta.collect.UnmodifiableCollection#asList()} and * {@link net.morimekta.collect.UnmodifiableMapBase#orderedBy(java.util.Comparator)}. */ module net.morimekta.collect { exports net.morimekta.collect; exports net.morimekta.collect.util; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy