Package fj.data
Common algebraic data types.
-
Interface Summary Interface Description IO<A> IO monad for processing filesSafeIO<A> -
Class Summary Class Description $<A,B> The constant arrow, for attaching a new name to an existing type.Array<A> Provides an interface to arrays.Array.ImmutableProjection<A> Projects an array by providing only operations which do not mutate.Collectors Conversions Functions that convert between data structure types.DList<A> Difference List.Either<A,B> TheEither
type represents a value of one of two possible types (a disjoint union).Either.Left<A,B> Either.LeftProjection<A,B> A left projection of an either value.Either.Right<A,B> Either.RightProjection<A,B> A right projection of an either value.Either3<A,B,C> Either3.Left<A,B,C> Either3.LeftProjection<A,B,C> Either3.Middle<A,B,C> Either3.MiddleProjection<A,B,C> Either3.Right<A,B,C> Either3.RightProjection<A,B,C> Enumerator<A> Abstracts over a type that may have a successor and/or predecessor value.Eval<A> Eval
is an abstraction over different models of evaluation.Eval.Always<A> Represents a lazy computation that is evaluated every time when it's requested.Eval.BindTrampolineEval<A,B> Eval.DeferEval<A> Eval.Later<A> Represents a lazy computation that is evaluated only once.Eval.Now<A> Represents an eager computation.Eval.PureTrampolineEval<A> Eval.TrampolineEval<A> A helper abstraction that allows to perform recursive lazy transformations in O(1) stack space.HashMap<K,V> A mutable hash map providing O(1) lookup.HashSet<A> A mutable hash set that guarantees uniqueness of its elements providing O(1) lookup.IOFunctions IO monad for processing files, with main methodsIOFunctions.enumFileLines(java.io.File, fj.data.Option<java.nio.charset.Charset>, fj.data.Iteratee.IterV<java.lang.String, A>)
,IOFunctions.enumFileChars(java.io.File, fj.data.Option<java.nio.charset.Charset>, fj.data.Iteratee.IterV<java.lang.Character, A>)
andIOFunctions.enumFileCharChunks(java.io.File, fj.data.Option<java.nio.charset.Charset>, fj.data.Iteratee.IterV<char[], A>)
(the latter one is the fastest as char chunks read from the file are directly passed to the iteratee without indirection in between).IOFunctions.CharChunkReader<A> IOFunctions.CharChunkReader2<A> IOFunctions.LineReader<A> IterableW<A> A wrapper for Iterable that equips it with some useful functions.Iteratee Iteratee.Input<E> The input to an iteratee.Iteratee.IterV<E,A> A pure iteratee computation which is either done or needs more inputJava Functions that convert between types from the core Java API.Java8 LazyString A lazy (non-evaluated) immutable character string.List<A> Provides an in-memory, immutable, singly linked list.List.Buffer<A> A mutable, singly linked list.List.Cons<A> List.Nil<A> List.Optic Optic factory methods for a ListList.Unsafe Natural Represents a natural number (zero, one, two, etc.)NonEmptyList<A> Provides an in-memory, immutable, singly linked list with totalhead
andtail
.Option<A> An optional value that may be none (no value) or some (a value).Option.None<A> Option.Optic Option.Some<A> PriorityQueue<K,A> A priority queue implementation backed by aFingerTree
.Reader<A,B> The Reader monad (also called the function monad, so equivalent to the idea of F).Seq<A> Provides an immutable finite sequence, implemented as a finger tree.Set<A> Provides an in-memory, immutable set, implemented as a red/black tree.Set.Empty<A> Set.Tree<A> State<S,A> Stream<A> A lazy (not yet evaluated), immutable, singly linked list.Stream.Cons<A> Stream.Nil<A> Tree<A> Provides a lazy, immutable, non-empty, multi-way tree (a rose tree).TreeMap<K,V> An immutable, in-memory map, backed by a red-black tree.TreeZipper<A> Provides a zipper structure for rose trees, which is a Tree supplied with a location within that tree.Validation<E,T> Isomorphic toEither
but has renamed functions and represents failure on the left and success on the right.Validation.FailProjection<E,T> A failing projection of a validation.Writer<W,A> Zipper<A> Provides a pointed stream, which is a non-empty zipper-like stream structure that tracks an index (focus) position in a stream. -
Enum Summary Enum Description Set.Color