Package com.myjavatools.lib.foundation

com.myjavatools.lib.foundation deals with very general notions: Function, Filter (Predicate), and their applications to Collections framework classes.

See:
          Description

Class Summary
CompoundIterable<T> CompoundIterable is an Iterable that is composed of several other iterable.
Filter<T> Filter is a Function that returns Boolean values; boolean accept() is an alias for Function.apply().
Function<X,Y> Function is an abstract class that represents the mathematical notion of function: X -> Y.
FunctionalMap<Domain,Codomain> FunctionalMap is a helper class that implements Map which maps keys from Domain set to values of Domain (a.k.a.
Iterators Iterators is a utility class that contains static methods for iterators
Iterators.EmptyIterator<T> EmptyIterator is a helper class that does not contain any elements and throws an exception when next() is called.
KeyValueArrayMap<X,Y> KeyValueArrayMap is a helper class that implements Map which is based on a key/value array Note that this class does not take any additional memory; lazy evaluation uses only the array provided.
KeyValuePairsMap<X,Y> KeyValuePairsMap is a helper class that implements Map which is based on a key/value array Note that this class does not take any additional memory; lazy evaluation uses only the array provided.
Maps  
Objects Objects is a utility class that contains various unsorted static methods for foundation package
Pair<Left,Right> Pair<Left, Right> is a class that represents pairs of objects.
RangeList RangeList is a class that represents a list of values in a range.
Sample1  
 

Package com.myjavatools.lib.foundation Description

com.myjavatools.lib.foundation deals with very general notions: Function, Filter (Predicate), and their applications to Collections framework classes.

Package Specification

Function<X,Y> is a holder for a method mapping X to Y. A function can be easily build from a Map; a Map can be build from a function if you provide a Set of keys.
Having a function: X -> Y, you can create a List<Y> view of function values on a List<X>
Filter<T> is a Function<T,Boolean>, and can be used for filtering (grepping) collections, iterables, etc.
Maps contains a loose group of static methods that are responsible for standard operations on maps: composition, reverse, restriction to a collection, application of Maps to Lists, Iterables, factory methods that create maps from key/value pairs.
Iterators contains several methods for iterators: concatenation, applying a function to an iterator, grepping an iterator using a filter.

Related Documentation