Package fj
Class Show<A>
java.lang.Object
fj.Show<A>
Renders an object for display.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Show
<BigDecimal> A show instance for theBigDecimal
type.static final Show
<BigInteger> A show instance for theBigInteger
type.A show instance for theboolean
type.A show instance for thebyte
type.A show instance for thechar
type.A show instance for thedouble
type.A show instance for thefloat
type.static final Show
<HList.HNil> A show instance for the empty heterogeneous Stream.A show instance for theint
type.static final Show
<LazyString> A show instance for lazy strings.A show instance for thelong
type.A show instance for natural numbers.A show instance for theshort
type.static final Show
<StringBuffer> A show instance for theStringBuffer
type.static final Show
<StringBuilder> A show instance for theStringBuilder
type.A show instance for theString
type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <A> Show
<A> anyShow()
Returns a show instance that usesObject.toString()
to perform the display rendering.A show instance for theArray
type.A show instance for theClass
type.<B> Show
<B> Maps the given function across this show as a contra-variant functor.either3Show
(Show<A> sa, Show<B> sb, Show<C> sc) eitherShow
(Show<A> sa, Show<B> sb) A show instance for theEither
type.static <V,
A> Show <FingerTree<V, A>> fingerTreeShow
(Show<V> sv, Show<A> sa) hamtNodeShow
(Show<K> sk, Show<V> sv) static <K,
V> Show <HashArrayMappedTrie<K, V>> static <E,
L extends HList<L>>
Show<HList.HCons<E, L>> A show instance for heterogeneous Streams.A show instance for theStream
type.static <A> Show
<NonEmptyList<A>> nonEmptyListShow
(Show<A> sa) A show instance for theNonEmptyList
type.optionShow
(Show<A> sa) A show instance for theOption
type.A show instance for thetuple-1
type.p1ShowEager
(Show<A> sa) p1ShowLazy
(Show<A> sa) A show instance for thetuple-2
type in the style of a mapping from A to B.A show instance for thetuple-2
type.A show instance for thetuple-2
type.A show instance for thetuple-3
type.A show instance for thetuple-4
type.A show instance for thetuple-5
type.A show instance for thetuple-6
type.A show instance for thetuple-7
type.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-8
type.Prints the given argument to the standard output stream.Prints the given argument to the standard output stream with a new line.void
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) resultShow
(Show<A> sa, Show<I> si) A show instance for theResult
type.A show instance for theSet
type.Returns the display rendering of the given argument.static <A> Show
<A> Returns a show instance using the given function.show_()
Returns the transformation equivalent to this show.Returns the display rendering of the given argument.Returns the display rendering of the given argument as aString
.static <A> Show
<A> Returns a show instance using the given function.showS_()
Returns the transformation equivalent to this show.streamShow
(Show<A> sa) A show instance for theStream
type.streamShow
(Show<A> sa, String start, String sep, String end) A show instance for theStream
type.streamShow_
(Show<A> sa, String start, String sep, String end) Returns the transformation equivalent for the stream show.treeMapShow
(Show<K> sk, Show<V> sv) A show instance for theTreeMap
type.A show instance for theTree
type.unlineShow
(Show<A> sa) A show instance for streams that splits into lines.A show instance for a vector-2.A show instance for a vector-3.A show instance for a vector-4.A show instance for a vector-5.A show instance for a vector-6.A show instance for a vector-7.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 theValidation
type.
-
Field Details
-
f
-
booleanShow
A show instance for theboolean
type. -
byteShow
A show instance for thebyte
type. -
charShow
A show instance for thechar
type. -
doubleShow
A show instance for thedouble
type. -
floatShow
A show instance for thefloat
type. -
intShow
A show instance for theint
type. -
bigintShow
A show instance for theBigInteger
type. -
bigdecimalShow
A show instance for theBigDecimal
type. -
longShow
A show instance for thelong
type. -
shortShow
A show instance for theshort
type. -
stringShow
A show instance for theString
type. -
stringBufferShow
A show instance for theStringBuffer
type. -
stringBuilderShow
A show instance for theStringBuilder
type. -
naturalShow
A show instance for natural numbers. -
lazyStringShow
A show instance for lazy strings. -
HListShow
A show instance for the empty heterogeneous Stream. -
bitSetShow
-
-
Constructor Details
-
Show
-
-
Method Details
-
contramap
Maps the given function across this show as a contra-variant functor.- Parameters:
f
- The function to map.- Returns:
- A new show.
-
show
Returns the display rendering of the given argument.- Parameters:
a
- The argument to display.- Returns:
- The display rendering of the given argument.
-
showl
Returns the display rendering of the given argument.- Parameters:
a
- The argument to display.- Returns:
- The display rendering of the given argument.
-
showS
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_
Returns the transformation equivalent to this show.- Returns:
- the transformation equivalent to this show.
-
show_
Returns the transformation equivalent to this show.- Returns:
- the transformation equivalent to this show.
-
println
Prints the given argument to the standard output stream with a new line.- Parameters:
a
- The argument to print.- Returns:
- The unit value.
-
print
Prints the given argument to the standard output stream.- Parameters:
a
- The argument to print.- Returns:
- The unit value.
-
printlnE
Prints the given argument to the standard error stream with a new line.- Parameters:
a
- The argument to print.
-
show
Returns a show instance using the given function.- Parameters:
f
- The function to use for the returned show instance.- Returns:
- A show instance.
-
showS
Returns a show instance using the given function.- Parameters:
f
- The function to use for the returned show instance.- Returns:
- A show instance.
-
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
A show instance for theOption
type.- Parameters:
sa
- Show for the element of the option.- Returns:
- A show instance for the
Option
type.
-
eitherShow
A show instance for theEither
type. -
either3Show
-
resultShow
A show instance for theResult
type. -
validationShow
A show instance for theValidation
type.- Parameters:
sa
- Show for the fail side of theValidation
.sb
- Show for the success side of theValidation
.- Returns:
- A show instance for the
Validation
type.
-
listShow
A show instance for theStream
type.- Parameters:
sa
- Show for the elements of the Stream.- Returns:
- A show instance for the
Stream
type.
-
nonEmptyListShow
A show instance for theNonEmptyList
type.- Parameters:
sa
- Show for the elements of the non-empty Stream.- Returns:
- A show instance for the
NonEmptyList
type.
-
treeShow
A show instance for theTree
type.- Parameters:
sa
- Show for the elements of the tree.- Returns:
- A show instance for the
Tree
type.
-
digitShow
-
nodeShow
-
fingerTreeShow
-
seqShow
-
setShow
A show instance for theSet
type.- Parameters:
sa
- Show for the elements of the set.- Returns:
- A show instance for the
Set
type.
-
treeMapShow
A show instance for theTreeMap
type.- Parameters:
sk
- Show for the keys of the TreeMap.sv
- Show for the values of the TreeMap.- Returns:
- A show instance for the
TreeMap
type.
-
p2MapShow
A show instance for thetuple-2
type 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-2
type.
-
p2Show
public static <A,B> Show<P2<A,B>> p2Show(Show<A> sa, Show<B> sb, String start, String sep, String end) A show instance for thetuple-2
type.- 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-2
type.
-
streamShow
A show instance for theStream
type.- Parameters:
sa
- Show for the elements of the stream.- Returns:
- A show instance for the
Stream
type.
-
streamShow
A show instance for theStream
type.- 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
Stream
type.
-
streamShow_
public static <A> F<Stream<A>,Stream<Character>> streamShow_(Show<A> sa, String start, String sep, String end) Returns the transformation equivalent for the stream show. -
arrayShow
A show instance for theArray
type.- Parameters:
sa
- Show for the elements of the array.- Returns:
- A show instance for the
Array
type.
-
classShow
A show instance for theClass
type.- Returns:
- A show instance for the
Class
type.
-
p1Show
A show instance for thetuple-1
type.- Parameters:
sa
- Show for the first element of the tuple.- Returns:
- A show instance for the
tuple-1
type.
-
p1ShowLazy
-
p1ShowEager
-
p2Show
A show instance for thetuple-2
type.- 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-2
type.
-
p3Show
A show instance for thetuple-3
type.- 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-3
type.
-
p4Show
A show instance for thetuple-4
type.- 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-4
type.
-
p5Show
public static <A,B, Show<P5<A,C, D, E> B, p5ShowC, D, E>> (Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd, Show<E> se) A show instance for thetuple-5
type.- 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-5
type.
-
p6Show
public static <A,B, Show<P6<A,C, D, E, F$> B, p6ShowC, D, E, F$>> (Show<A> sa, Show<B> sb, Show<C> sc, Show<D> sd, Show<E> se, Show<F$> sf) A show instance for thetuple-6
type.- 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-6
type.
-
p7Show
public static <A,B, Show<P7<A,C, D, E, F$, G> B, p7ShowC, D, E, F$, G>> (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-7
type.- 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-7
type.
-
p8Show
public static <A,B, Show<P8<A,C, D, E, F$, G, H> B, p8ShowC, D, E, F$, G, H>> (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-8
type.- 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-8
type.
-
priorityQueueShow
-
v2Show
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
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
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
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
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
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
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
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
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.
-
hamtNodeShow
-
hamtShow
-