New collections that were drafted from the upcoming Java implementation.
Changes in the CollectionHolder instances
A lot of new instances have been created ranging from adaptor classes, encapsulator classes to conversion from the beta CollectionHandler (with its deprecation change).
More size related methods are being added to give more options toward the iterators and collections.
Little addition on the exception being thrown for an index IndexNotFoundException instead of IndexOutOfBoundsException
And note that the lazy instances are being repurpose for an encapsulator class to create a specialized class under its hood.
- New alias method
hasAtLeast1Element,containsAtLeast1Element&includesAtLeast1ElementforisNotEmpty - New method
hasExactly1Elementwith aliascontainsExactly1Element&includesExactly1Element - New method
hasAtMost1Elementwith aliascontainsAtMost1Element&includesAtMost1Element - New method
hasAtLeast2Elementswith aliascontainsAtLeast2Elements&includesAtLeast2Elements - New method
hasExactly2Elementswith aliascontainsExactly2Elements&includesExactly2Elements - New method
hasAtMost2Elementswith aliascontainsAtMost2Elements&includesAtMost2Elements - Change of exception being thrown for
firstIndexOf,lastIndexOf,indexOfFirst,indexOfFirstIndexed,indexOfLast,indexOfLastIndexedto haveEmptyCollectionException,IndexNotFoundException,IndexOutOfBoundsException,ForbiddenIndexException&InvalidIndexRangeExceptionas the possible exception being thrown - New
AbstractUnimplementedCollectionHolder(for collections with specified non-aliased methods) - New
AbstractCollectionHolderOf1(for collections with only a single value) - New
AbstractCollectionHolderOf2(for collections with only two values) - New
MinimalistAsCollectionHolder(an adaptor class for theMinimalistCollectionHolder) - New
CollectionViewer(to encapsulate aCollectionHolder) - New
MinimalistCollectionViewer(to encapsulate aMinimalistCollectionHolder) - New
CollectionHolderOf1(to get aCollectionHolderof 1 value) - New
CollectionHolderOf2(to get aCollectionHolderof 2 values) - New
ArrayAsCollectionHolder(an adaptor class for theArray) - New
ArrayOf1AsCollectionHolder(to get aCollectionHolderfrom anArrayof 1 value) - New
ArrayOf2AsCollectionHolder(to get aCollectionHolderfrom anArrayof 2 values) - New
SetAsCollectionHolder(an adaptor class for theSet) - New
SetOf1AsCollectionHolder(to get aCollectionHolderfrom anSetof 1 value) - New
SetOf2AsCollectionHolder(to get aCollectionHolderfrom anSetof 2 values) - Rename of
LazyGenericCollectionHoldertoLazyCollectionHolder - New
LazyCollectionHolderOf1(to retrieve a single value later in the process) - New
LazyCollectionHolderOf2(to retrieve a two values later in the process) - New
LazyCollectionHolderOf0Or1(to lazily retrieve 0 or 1 value) - New
LazyCollectionHolderOf1Or2(to lazily retrieve 1 or 2 values) - New
LazyCollectionHolderOf0Or1Or2(to lazily retrieve 0, 1 or 2 values)
Changes in CollectionIterator
The same size changes are being apply as the CollectionHolder (hasExactly1Element, hasAtMost1Element, hasAtLeast2Elements, hasExactly2Elements & hasAtMost2Elements).
Plus, specific instances for 1 and 2 values are being created as well.
- New
AbstractUnimplementedCollectionIterator(for iterators with specified non-aliased methods) - New
AbstractCollectionIteratorOf1(for iterators with only a single value) - New
AbstractCollectionIteratorOf2(for iterators with only two values) - New
CollectionIteratorOf1(for single value iterator) - New
CollectionIteratorOf2(for two values iterator) - New interface
IteratorValueto improve over the JavaScript juncture plus more methods - New interface
InsideIteratorValueto give the index being retrieved plus to be anIteratorYieldResult - New interface
OutsideIteratorValueto give the impossible value plus to be anIteratorResultResult - New
IteratorValueOf1(for a single value for an iterator value) - New
IteratorValueOf1Of2(for the 1st value out of two values for an iterator value) - New
IteratorValueOf2Of2(for the 2nd value out of two values for an iterator value)
Deprecation of the CollectionHandler and its features
Some constants and types are being removed for the unnecessary usage
- Deprecation of the
LazyGenericCollectionHolderin favor of theLazyCollectionHolder - Deprecation of the
CollectionConstants.EMPTY_COLLECTION_HOLDERin favor of the instance directly (EmptyCollectionHolder.get) - Deprecation of the
CollectionConstants.LAZY_EMPTY_COLLECTION_HOLDERin favor of the instance directly (EmptyCollectionHolder.get) - Deprecation of the
CollectionConstants.EmptyCollectionHolderin favor of the constructor instance directly (EmptyCollectionHolder) - Deprecation of the
CollectionConstants.GenericCollectionHolderin favor of the constructor instance directly (GenericCollectionHolder) - Deprecation of the
CollectionConstants.GenericMinimalistCollectionHolderin favor of the constructor instance directly (GenericMinimalistCollectionHolder) - Deprecation of the
CollectionConstants.LazyCollectionHolderin favor of the constructor instance directly (LazyCollectionHolder)
And since new instances are being created, all of the CollectionHandler are being deprecated for the upcoming version 2.1.
This includes:
AbstractCollectionHandler(to be replaced withAbstractCollectionHolder)AbstractCollectionHandlerBy1Value(to be replaced withAbstractCollectionHolderOf1)AbstractCollectionHandlerBy2Values(to be replaced withAbstractCollectionHolderOf2)AbstractCollectionHandlerWithIteratbleOrIterator(to be replaced withAbstractCollectionHolder)CollectionHandler(to be replaced withCollectionHolder)EmptyCollectionHandler(to be replaced withEmptyCollectionHolder)CollectionHandlerByArray(to be replaced withArrayAsCollectionHolder)CollectionHandlerByArrayOf1(to be replaced withArrayOf1AsCollectionHolderorCollectionHolderOf1)CollectionHandlerByArrayOf2(to be replaced withArrayOf2AsCollectionHolderorCollectionHolderOf2)CollectionHandlerBySet(to be replaced withSetAsCollectionHolder)CollectionHandlerBySetOf1(to be replaced withSetOf1AsCollectionHolderorCollectionHolderOf1)CollectionHandlerBySetOf2(to be replaced withSetOf2AsCollectionHolderorCollectionHolderOf2)CollectionHandlerByCollectionHolder(to be replaced withGenericCollectionHolder)CollectionHandlerByCollectionHolderOf1(to be replaced withCollectionHolderOf1)CollectionHandlerByCollectionHolderOf2(to be replaced withCollectionHolderOf2)CollectionHandlerByMinimalistCollectionHolder(to be replaced withMinimalistAsCollectionHolder)CollectionHandlerByMinimalistCollectionHolderOf1(to be replaced withCollectionHolderOf1)CollectionHandlerByMinimalistCollectionHolderOf2(to be replaced withCollectionHolderOf2)CollectionHandlerByCollectionIterator(to be replaced withIteratorAsCollectionHolder)CollectionHandlerByCollectionIteratorOf1(to be replaced withCollectionHolderOf1)CollectionHandlerByCollectionIteratorOf2(to be replaced withCollectionHolderOf2)CollectionHandlerByIterable(to be replaced withJsIterableAsCollectionHolder)CollectionHandlerByIterableWithSize(to be replaced withJsIterableAsCollectionHolder)CollectionHandlerByIterableWithSizeOf1(to be replaced withCollectionHolderOf1)CollectionHandlerByIterableWithSizeOf2(to be replaced withCollectionHolderOf2)CollectionHandlerByIterator(to be replaced withJsIteratorAsCollectionHolder)
Other changes
- Upgrade of the lazy dependency from 1.7.2 to 1.7.3
New Optional and EmptyOptional are being created to replicate the Java Optional.
New Tuple, AbstractTuple, Empty, Monuple and Couple are being created to replicate the tuples in both Kotlin and C# with methods to help utilizing them
Note that typescript has announced its new version 7.0. This will be not present in this release. The next release will include the change.