Package fj
Class Show<A>
- java.lang.Object
-
- fj.Show<A>
-
public final class Show<A> extends java.lang.ObjectRenders an object for display.
-
-
Field Summary
Fields Modifier and Type Field Description static Show<java.math.BigDecimal>bigdecimalShowA show instance for theBigDecimaltype.static Show<java.math.BigInteger>bigintShowA show instance for theBigIntegertype.static Show<BitSet>bitSetShowstatic Show<java.lang.Boolean>booleanShowA show instance for thebooleantype.static Show<java.lang.Byte>byteShowA show instance for thebytetype.static Show<java.lang.Character>charShowA show instance for thechartype.static Show<java.lang.Double>doubleShowA show instance for thedoubletype.private F<A,Stream<java.lang.Character>>fstatic Show<java.lang.Float>floatShowA show instance for thefloattype.static Show<HList.HNil>HListShowA show instance for the empty heterogeneous Stream.static Show<java.lang.Integer>intShowA show instance for theinttype.static Show<LazyString>lazyStringShowA show instance for lazy strings.static Show<java.lang.Long>longShowA show instance for thelongtype.static Show<Natural>naturalShowA show instance for natural numbers.static Show<java.lang.Short>shortShowA show instance for theshorttype.static Show<java.lang.StringBuffer>stringBufferShowA show instance for theStringBuffertype.static Show<java.lang.StringBuilder>stringBuilderShowA show instance for theStringBuildertype.static Show<java.lang.String>stringShowA show instance for theStringtype.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <A> Show<A>anyShow()Returns a show instance that usesObject.toString()to perform the display rendering.static <A> Show<Array<A>>arrayShow(Show<A> sa)A show instance for theArraytype.static <A> Show<Class<A>>classShow()A show instance for theClasstype.<B> Show<B>contramap(F<B,A> f)Maps the given function across this show as a contra-variant functor.static <V,A>
Show<Digit<V,A>>digitShow(Show<V> sv, Show<A> sa)static <A,B,C>
Show<Either3<A,B,C>>either3Show(Show<A> sa, Show<B> sb, Show<C> sc)static <A,B>
Show<Either<A,B>>eitherShow(Show<A> sa, Show<B> sb)A show instance for theEithertype.static <V,A>
Show<FingerTree<V,A>>fingerTreeShow(Show<V> sv, Show<A> sa)static <K,V>
Show<Node<K,V>>hamtNodeShow(Show<K> sk, Show<V> sv)static <K,V>
Show<HashArrayMappedTrie<K,V>>hamtShow(Show<K> sk, Show<V> sv)static <E,L extends HList<L>>
Show<HList.HCons<E,L>>HListShow(Show<E> e, Show<L> l)A show instance for heterogeneous Streams.static <A> Show<List<A>>listShow(Show<A> sa)A show instance for theStreamtype.static <V,A>
Show<Node<V,A>>nodeShow(Show<V> sv, Show<A> sa)static <A> Show<NonEmptyList<A>>nonEmptyListShow(Show<A> sa)A show instance for theNonEmptyListtype.static <A> Show<Option<A>>optionShow(Show<A> sa)A show instance for theOptiontype.static <A> Show<P1<A>>p1Show(Show<A> sa)A show instance for thetuple-1type.static <A> Show<P1<A>>p1ShowEager(Show<A> sa)static <A> Show<P1<A>>p1ShowLazy(Show<A> sa)static <A,B>
Show<P2<A,B>>p2MapShow(Show<A> sa, Show<B> sb)A show instance for thetuple-2type in the style of a mapping from A to B.static <A,B>
Show<P2<A,B>>p2Show(Show<A> sa, Show<B> sb)A show instance for thetuple-2type.static <A,B>
Show<P2<A,B>>p2Show(Show<A> sa, Show<B> sb, java.lang.String start, java.lang.String sep, java.lang.String end)A show instance for thetuple-2type.static <A,B,C>
Show<P3<A,B,C>>p3Show(Show<A> sa, Show<B> sb, Show<C> sc)A show instance for thetuple-3type.static <A,B,C,D>
Show<P4<A,B,C,D>>p4Show(Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd)A show instance for thetuple-4type.static <A,B,C,D,E>
Show<P5<A,B,C,D,E>>p5Show(Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd, Show<E> se)A show instance for thetuple-5type.static <A,B,C,D,E,F$>
Show<P6<A,B,C,D,E,F$>>p6Show(Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd, Show<E> se, Show<F$> sf)A show instance for thetuple-6type.static <A,B,C,D,E,F$,G>
Show<P7<A,B,C,D,E,F$,G>>p7Show(Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd, Show<E> se, Show<F$> sf, Show<G> sg)A show instance for thetuple-7type.static <A,B,C,D,E,F$,G,H>
Show<P8<A,B,C,D,E,F$,G,H>>p8Show(Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd, Show<E> se, Show<F$> sf, Show<G> sg, Show<H> sh)A show instance for thetuple-8type.Unitprint(A a)Prints the given argument to the standard output stream.Unitprintln(A a)Prints the given argument to the standard output stream with a new line.voidprintlnE(A a)Prints the given argument to the standard error stream with a new line.static <K,V>
Show<PriorityQueue<K,V>>priorityQueueShow(Show<K> sk, Show<V> sv)static <I,A>
Show<Result<I,A>>resultShow(Show<A> sa, Show<I> si)A show instance for theResulttype.static <A> Show<Seq<A>>seqShow(Show<A> sa)static <A> Show<Set<A>>setShow(Show<A> sa)A show instance for theSettype.Stream<java.lang.Character>show(A a)Returns the display rendering of the given argument.static <A> Show<A>show(F<A,Stream<java.lang.Character>> f)Returns a show instance using the given function.F<A,Stream<java.lang.Character>>show_()Returns the transformation equivalent to this show.List<java.lang.Character>showl(A a)Returns the display rendering of the given argument.java.lang.StringshowS(A a)Returns the display rendering of the given argument as aString.static <A> Show<A>showS(F<A,java.lang.String> f)Returns a show instance using the given function.F<A,java.lang.String>showS_()Returns the transformation equivalent to this show.static <A> Show<Stream<A>>streamShow(Show<A> sa)A show instance for theStreamtype.static <A> Show<Stream<A>>streamShow(Show<A> sa, java.lang.String start, java.lang.String sep, java.lang.String end)A show instance for theStreamtype.static <A> F<Stream<A>,Stream<java.lang.Character>>streamShow_(Show<A> sa, java.lang.String start, java.lang.String sep, java.lang.String end)Returns the transformation equivalent for the stream show.static <K,V>
Show<TreeMap<K,V>>treeMapShow(Show<K> sk, Show<V> sv)A show instance for theTreeMaptype.static <A> Show<Tree<A>>treeShow(Show<A> sa)A show instance for theTreetype.static <A> Show<Stream<A>>unlineShow(Show<A> sa)A show instance for streams that splits into lines.static <A> Show<V2<A>>v2Show(Show<A> ea)A show instance for a vector-2.static <A> Show<V3<A>>v3Show(Show<A> ea)A show instance for a vector-3.static <A> Show<V4<A>>v4Show(Show<A> ea)A show instance for a vector-4.static <A> Show<V5<A>>v5Show(Show<A> ea)A show instance for a vector-5.static <A> Show<V6<A>>v6Show(Show<A> ea)A show instance for a vector-6.static <A> Show<V7<A>>v7Show(Show<A> ea)A show instance for a vector-7.static <A> Show<V8<A>>v8Show(Show<A> ea)A show instance for a vector-8.static <A,B>
Show<Validation<A,B>>validationShow(Show<A> sa, Show<B> sb)A show instance for theValidationtype.
-
-
-
Field Detail
-
booleanShow
public static final Show<java.lang.Boolean> booleanShow
A show instance for thebooleantype.
-
byteShow
public static final Show<java.lang.Byte> byteShow
A show instance for thebytetype.
-
charShow
public static final Show<java.lang.Character> charShow
A show instance for thechartype.
-
doubleShow
public static final Show<java.lang.Double> doubleShow
A show instance for thedoubletype.
-
floatShow
public static final Show<java.lang.Float> floatShow
A show instance for thefloattype.
-
intShow
public static final Show<java.lang.Integer> intShow
A show instance for theinttype.
-
bigintShow
public static final Show<java.math.BigInteger> bigintShow
A show instance for theBigIntegertype.
-
bigdecimalShow
public static final Show<java.math.BigDecimal> bigdecimalShow
A show instance for theBigDecimaltype.
-
longShow
public static final Show<java.lang.Long> longShow
A show instance for thelongtype.
-
shortShow
public static final Show<java.lang.Short> shortShow
A show instance for theshorttype.
-
stringShow
public static final Show<java.lang.String> stringShow
A show instance for theStringtype.
-
stringBufferShow
public static final Show<java.lang.StringBuffer> stringBufferShow
A show instance for theStringBuffertype.
-
stringBuilderShow
public static final Show<java.lang.StringBuilder> stringBuilderShow
A show instance for theStringBuildertype.
-
lazyStringShow
public static final Show<LazyString> lazyStringShow
A show instance for lazy strings.
-
HListShow
public static final Show<HList.HNil> HListShow
A show instance for the empty heterogeneous Stream.
-
-
Method Detail
-
contramap
public <B> Show<B> contramap(F<B,A> f)
Maps the given function across this show as a contra-variant functor.- Parameters:
f- The function to map.- Returns:
- A new show.
-
show
public Stream<java.lang.Character> show(A a)
Returns the display rendering of the given argument.- Parameters:
a- The argument to display.- Returns:
- The display rendering of the given argument.
-
showl
public List<java.lang.Character> showl(A a)
Returns the display rendering of the given argument.- Parameters:
a- The argument to display.- Returns:
- The display rendering of the given argument.
-
showS
public java.lang.String showS(A a)
Returns the display rendering of the given argument as aString.- Parameters:
a- The argument to display.- Returns:
- The display rendering of the given argument as a
String.
-
showS_
public F<A,java.lang.String> showS_()
Returns the transformation equivalent to this show.- Returns:
- the transformation equivalent to this show.
-
show_
public F<A,Stream<java.lang.Character>> show_()
Returns the transformation equivalent to this show.- Returns:
- the transformation equivalent to this show.
-
println
public Unit println(A a)
Prints the given argument to the standard output stream with a new line.- Parameters:
a- The argument to print.- Returns:
- The unit value.
-
print
public Unit print(A a)
Prints the given argument to the standard output stream.- Parameters:
a- The argument to print.- Returns:
- The unit value.
-
printlnE
public void printlnE(A a)
Prints the given argument to the standard error stream with a new line.- Parameters:
a- The argument to print.
-
show
public static <A> Show<A> show(F<A,Stream<java.lang.Character>> f)
Returns a show instance using the given function.- Parameters:
f- The function to use for the returned show instance.- Returns:
- A show instance.
-
showS
public static <A> Show<A> showS(F<A,java.lang.String> f)
Returns a show instance using the given function.- Parameters:
f- The function to use for the returned show instance.- Returns:
- A show instance.
-
anyShow
public static <A> Show<A> anyShow()
Returns a show instance that usesObject.toString()to perform the display rendering.- Returns:
- A show instance that uses
Object.toString()to perform the display rendering.
-
optionShow
public static <A> Show<Option<A>> optionShow(Show<A> sa)
A show instance for theOptiontype.- Parameters:
sa- Show for the element of the option.- Returns:
- A show instance for the
Optiontype.
-
eitherShow
public static <A,B> Show<Either<A,B>> eitherShow(Show<A> sa, Show<B> sb)
A show instance for theEithertype.
-
either3Show
public static <A,B,C> Show<Either3<A,B,C>> either3Show(Show<A> sa, Show<B> sb, Show<C> sc)
-
resultShow
public static <I,A> Show<Result<I,A>> resultShow(Show<A> sa, Show<I> si)
A show instance for theResulttype.
-
validationShow
public static <A,B> Show<Validation<A,B>> validationShow(Show<A> sa, Show<B> sb)
A show instance for theValidationtype.- Parameters:
sa- Show for the fail side of theValidation.sb- Show for the success side of theValidation.- Returns:
- A show instance for the
Validationtype.
-
listShow
public static <A> Show<List<A>> listShow(Show<A> sa)
A show instance for theStreamtype.- Parameters:
sa- Show for the elements of the Stream.- Returns:
- A show instance for the
Streamtype.
-
nonEmptyListShow
public static <A> Show<NonEmptyList<A>> nonEmptyListShow(Show<A> sa)
A show instance for theNonEmptyListtype.- Parameters:
sa- Show for the elements of the non-empty Stream.- Returns:
- A show instance for the
NonEmptyListtype.
-
treeShow
public static <A> Show<Tree<A>> treeShow(Show<A> sa)
A show instance for theTreetype.- Parameters:
sa- Show for the elements of the tree.- Returns:
- A show instance for the
Treetype.
-
fingerTreeShow
public static <V,A> Show<FingerTree<V,A>> fingerTreeShow(Show<V> sv, Show<A> sa)
-
setShow
public static <A> Show<Set<A>> setShow(Show<A> sa)
A show instance for theSettype.- Parameters:
sa- Show for the elements of the set.- Returns:
- A show instance for the
Settype.
-
treeMapShow
public static <K,V> Show<TreeMap<K,V>> treeMapShow(Show<K> sk, Show<V> sv)
A show instance for theTreeMaptype.- Parameters:
sk- Show for the keys of the TreeMap.sv- Show for the values of the TreeMap.- Returns:
- A show instance for the
TreeMaptype.
-
p2MapShow
public static <A,B> Show<P2<A,B>> p2MapShow(Show<A> sa, Show<B> sb)
A show instance for thetuple-2type in the style of a mapping from A to B.- Parameters:
sa- Show for the first element of the tuple.sb- Show for the second element of the tuple.- Returns:
- A show instance for the
tuple-2type.
-
p2Show
public static <A,B> Show<P2<A,B>> p2Show(Show<A> sa, Show<B> sb, java.lang.String start, java.lang.String sep, java.lang.String end)
A show instance for thetuple-2type.- Parameters:
sa- Show for the first element of the tuple.sb- Show for the second element of the tuple.start- Prefix string for the show.sep- Separator string between elements of the tuple.end- Suffix string for the show.- Returns:
- A show instance for the
tuple-2type.
-
streamShow
public static <A> Show<Stream<A>> streamShow(Show<A> sa)
A show instance for theStreamtype.- Parameters:
sa- Show for the elements of the stream.- Returns:
- A show instance for the
Streamtype.
-
streamShow
public static <A> Show<Stream<A>> streamShow(Show<A> sa, java.lang.String start, java.lang.String sep, java.lang.String end)
A show instance for theStreamtype.- Parameters:
sa- Show for the first element of the tuple.start- Prefix string for the show.sep- Separator string between elements of the stream.end- Suffix string for the show.- Returns:
- A show instance for the
Streamtype.
-
streamShow_
public static <A> F<Stream<A>,Stream<java.lang.Character>> streamShow_(Show<A> sa, java.lang.String start, java.lang.String sep, java.lang.String end)
Returns the transformation equivalent for the stream show.
-
arrayShow
public static <A> Show<Array<A>> arrayShow(Show<A> sa)
A show instance for theArraytype.- Parameters:
sa- Show for the elements of the array.- Returns:
- A show instance for the
Arraytype.
-
classShow
public static <A> Show<Class<A>> classShow()
A show instance for theClasstype.- Returns:
- A show instance for the
Classtype.
-
p1Show
public static <A> Show<P1<A>> p1Show(Show<A> sa)
A show instance for thetuple-1type.- Parameters:
sa- Show for the first element of the tuple.- Returns:
- A show instance for the
tuple-1type.
-
p2Show
public static <A,B> Show<P2<A,B>> p2Show(Show<A> sa, Show<B> sb)
A show instance for thetuple-2type.- Parameters:
sa- Show for the first element of the tuple.sb- Show for the second element of the tuple.- Returns:
- A show instance for the
tuple-2type.
-
p3Show
public static <A,B,C> Show<P3<A,B,C>> p3Show(Show<A> sa, Show<B> sb, Show<C> sc)
A show instance for thetuple-3type.- Parameters:
sa- Show for the first element of the tuple.sb- Show for the second element of the tuple.sc- Show for the third element of the tuple.- Returns:
- A show instance for the
tuple-3type.
-
p4Show
public static <A,B,C,D> Show<P4<A,B,C,D>> p4Show(Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd)
A show instance for thetuple-4type.- Parameters:
sa- Show for the first element of the tuple.sb- Show for the second element of the tuple.sc- Show for the third element of the tuple.sd- Show for the fourth element of the tuple.- Returns:
- A show instance for the
tuple-4type.
-
p5Show
public static <A,B,C,D,E> Show<P5<A,B,C,D,E>> p5Show(Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd, Show<E> se)
A show instance for thetuple-5type.- Parameters:
sa- Show for the first element of the tuple.sb- Show for the second element of the tuple.sc- Show for the third element of the tuple.sd- Show for the fourth element of the tuple.se- Show for the fifth element of the tuple.- Returns:
- A show instance for the
tuple-5type.
-
p6Show
public static <A,B,C,D,E,F$> Show<P6<A,B,C,D,E,F$>> p6Show(Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd, Show<E> se, Show<F$> sf)
A show instance for thetuple-6type.- Parameters:
sa- Show for the first element of the tuple.sb- Show for the second element of the tuple.sc- Show for the third element of the tuple.sd- Show for the fourth element of the tuple.se- Show for the fifth element of the tuple.sf- Show for the sixth element of the tuple.- Returns:
- A show instance for the
tuple-6type.
-
p7Show
public static <A,B,C,D,E,F$,G> Show<P7<A,B,C,D,E,F$,G>> p7Show(Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd, Show<E> se, Show<F$> sf, Show<G> sg)
A show instance for thetuple-7type.- Parameters:
sa- Show for the first element of the tuple.sb- Show for the second element of the tuple.sc- Show for the third element of the tuple.sd- Show for the fourth element of the tuple.se- Show for the fifth element of the tuple.sf- Show for the sixth element of the tuple.sg- Show for the seventh element of the tuple.- Returns:
- A show instance for the
tuple-7type.
-
p8Show
public static <A,B,C,D,E,F$,G,H> Show<P8<A,B,C,D,E,F$,G,H>> p8Show(Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd, Show<E> se, Show<F$> sf, Show<G> sg, Show<H> sh)
A show instance for thetuple-8type.- Parameters:
sa- Show for the first element of the tuple.sb- Show for the second element of the tuple.sc- Show for the third element of the tuple.sd- Show for the fourth element of the tuple.se- Show for the fifth element of the tuple.sf- Show for the sixth element of the tuple.sg- Show for the seventh element of the tuple.sh- Show for the eighth element of the tuple.- Returns:
- A show instance for the
tuple-8type.
-
priorityQueueShow
public static <K,V> Show<PriorityQueue<K,V>> priorityQueueShow(Show<K> sk, Show<V> sv)
-
v2Show
public static <A> Show<V2<A>> v2Show(Show<A> ea)
A show instance for a vector-2.- Parameters:
ea- A show for the elements of the vector.- Returns:
- A show instance for a vector-2.
-
v3Show
public static <A> Show<V3<A>> v3Show(Show<A> ea)
A show instance for a vector-3.- Parameters:
ea- A show for the elements of the vector.- Returns:
- A show instance for a vector-3.
-
v4Show
public static <A> Show<V4<A>> v4Show(Show<A> ea)
A show instance for a vector-4.- Parameters:
ea- A show for the elements of the vector.- Returns:
- A show instance for a vector-4.
-
v5Show
public static <A> Show<V5<A>> v5Show(Show<A> ea)
A show instance for a vector-5.- Parameters:
ea- A show for the elements of the vector.- Returns:
- A show instance for a vector-5.
-
v6Show
public static <A> Show<V6<A>> v6Show(Show<A> ea)
A show instance for a vector-6.- Parameters:
ea- A show for the elements of the vector.- Returns:
- A show instance for a vector-6.
-
v7Show
public static <A> Show<V7<A>> v7Show(Show<A> ea)
A show instance for a vector-7.- Parameters:
ea- A show for the elements of the vector.- Returns:
- A show instance for a vector-7.
-
v8Show
public static <A> Show<V8<A>> v8Show(Show<A> ea)
A show instance for a vector-8.- Parameters:
ea- A show for the elements of the vector.- Returns:
- A show instance for a vector-8.
-
unlineShow
public static <A> Show<Stream<A>> unlineShow(Show<A> sa)
A show instance for streams that splits into lines.- Parameters:
sa- A show instance for the elements of a stream.- Returns:
- A show instance for streams that splits into lines.
-
HListShow
public static <E,L extends HList<L>> Show<HList.HCons<E,L>> HListShow(Show<E> e, Show<L> l)
A show instance for heterogeneous Streams.- Parameters:
e- A show instance for the first element of the Stream.l- A show instance for the rest of the Stream.- Returns:
- a show instance for heterogeneous Streams.
-
hamtShow
public static <K,V> Show<HashArrayMappedTrie<K,V>> hamtShow(Show<K> sk, Show<V> sv)
-
-