Maybe it would be an idea to add predicate collections, so a simple predicate can be added to a collection to check the validity of the new element.
interface Predicate<T>{
boolean valid(T item).
}
And maybe it would be an idea to add a null rejecting predicate.
I have written 'ncollections' These are null rejecting predicate collection with the advantage that you have a new type: NList, NCollection, NSet etc. Now you can force someone to use a specific kind of collection. I only don`t have the time to maintain it ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just released jaxlib-0.3.1
The package jaxlib.col.filtered implements predicated collections. Just named it "filtered" to be coherent with package jaxlib.closure.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe it would be an idea to add predicate collections, so a simple predicate can be added to a collection to check the validity of the new element.
interface Predicate<T>{
boolean valid(T item).
}
And maybe it would be an idea to add a null rejecting predicate.
I have written 'ncollections' These are null rejecting predicate collection with the advantage that you have a new type: NList, NCollection, NSet etc. Now you can force someone to use a specific kind of collection. I only don`t have the time to maintain it ;)
Good suggestion.
I will implement it.
j.
Just released jaxlib-0.3.1
The package jaxlib.col.filtered implements predicated collections. Just named it "filtered" to be coherent with package jaxlib.closure.