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

com.jongsoft.lang.collection.package-info Maven / Gradle / Ivy

The newest version!
/**
 * A purely functional based set of collection implementations based upon the {@linkplain com.jongsoft.lang.collection.Collection}.
 * 

* The implementation consists out of the following groups of interfaces: *

*
    *
  • {@linkplain com.jongsoft.lang.collection.Sequence}, a ordered collection type
  • *
  • {@linkplain com.jongsoft.lang.collection.Set}, a collection type that ensures uniqueness
  • *
  • {@linkplain com.jongsoft.lang.collection.Map}, a map implementation
  • *
  • {@linkplain com.jongsoft.lang.collection.Iterator}, a custom iteration implementation
  • *
*

* All implementations within this set of collections are immutable. Meaning that all operations on the collections * will result into either a new instance or an unchanged one. This leads to implementations similar to the snippet * to add values to a Collection. *

*
{@code
 *     // Correct usage of an immutable collection
 *     Sequence myStrings = API.List("one")
 *              .add("two")
 *              .add("three");
 *
 *     // Incorrect usage of an immutable collection, as the initial collection assigned to myString does not change
 *     Sequence myStrings = API.List("one");
 *     myStrings.add("two");
 *     myStrings.add("three");
 * }
* * @see Immutable objects explaind * @since 0.0.2 * @author Gerben Jongerius */ package com.jongsoft.lang.collection;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy