java.lang.Object
org.refcodes.textual.VerboseTextBuilder
The
VerboseTextBuilder
us a utility-builder for creating human
readable String
objects from arrays, collections or maps (instead of
solely printing out the object references of those collections). The arrays,
collections or maps may be nested in any way still producing accordingly
indented and parenthesized text down to the single elements in those
collections whose Object.toString()
method is invoked . This
utility-builder is very useful when printing debug or error logs or
inspecting such the like data structures "on the fly".-
Field Summary
Modifier and TypeFieldDescriptionstatic final char
static final char
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
asString
(boolean[] aElements) This method represents a shortcut for the instance methodtoString(boolean[])
though with public settings.static String
asString
(byte[] aElements) This method represents a shortcut for the instance methodtoString(byte[])
though with public settings.static String
asString
(char[] aElements) This method represents a shortcut for the instance methodtoString(char[])
though with public settings.static String
asString
(double[] aElements) This method represents a shortcut for the instance methodtoString(double[])
though with public settings.static String
asString
(float[] aElements) This method represents a shortcut for the instance methodtoString(float[])
though with public settings.static String
asString
(int[] aElements) This method represents a shortcut for the instance methodtoString(int[])
though with public settings.static String
asString
(long[] aElements) This method represents a shortcut for the instance methodtoString(long[])
though with public settings.static String
asString
(short[] aElements) This method represents a shortcut for the instance methodtoString(short[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(Boolean[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(Byte[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(Character[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(Double[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(Float[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(Integer[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(Long[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(Boolean[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(Boolean[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(Short[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(String[])
though with public settings.static String
asString
(Collection<?> aElements) This method represents a shortcut for the instance methodtoString(Boolean[])
though with public settings.static String
This method represents a shortcut for the instance methodtoString(Boolean[])
though with public settings.protected static String
asVerboseString
(Character aCollectionHead, Collection<?> aCollection, Character aCollectionTail) To verbose string.protected static String
asVerboseString
(Character aCollectionHead, Map<?, ?> aMap, Character aCollectionTail) To verbose string.Gets theString
to be used for the begin of a collection.gets theString
to be used for the begin of a collection.Object[]
Gets the elements for the elements property.void
setCollectionHead
(Character aHead) Sets theString
to be used for the begin of a collection.void
setCollectionTail
(Character aTail) Sets theString
to be used for the begin of a collection.void
setElements
(boolean[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(byte[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(char[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(double[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(float[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(int[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(long[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(short[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(Boolean[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(Byte[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(Character[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(Double[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(Float[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(Integer[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(Long[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(Object aElements) Sets the elements for the elements property.void
setElements
(Object[] aElements) Sets the elements for the elements property.void
setElements
(Short[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(String[] aElements) Sets the CSV elements for the CSV elements property.void
setElements
(Collection<?> aElements) Sets the elements.void
setElements
(Map<?, ?> aElements) Sets the elements for the elements property.toString()
TheString
being build by the builder upon the settings of the attributes.toString
(boolean[] aElements) TheString
being build by the builder upon the settings of the attributes and the provided argument.toString
(byte[] aElements) TheString
being build by the builder upon the settings of the attributes and the provided argument.toString
(char[] aElements) TheString
being build by the builder upon the settings of the attributes and the provided argument.toString
(double[] aElements) TheString
being build by the builder upon the settings of the attributes and the provided argument.toString
(float[] aElements) TheString
being build by the builder upon the settings of the attributes and the provided argument.toString
(int[] aElements) TheString
being build by the builder upon the settings of the attributes and the provided argument.toString
(long[] aElements) TheString
being build by the builder upon the settings of the attributes and the provided argument.toString
(short[] aElements) TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.toString
(Collection<?> aElements) TheString
being build by the builder upon the settings of the attributes and the provided argument.TheString
being build by the builder upon the settings of the attributes and the provided argument.withCollectionHead
(Character aHead) Sets theString
to be used for the begin of a collection.withElements
(boolean[] aElements) Sets the CSV elements for the CSV elements property.withElements
(byte[] aElements) Sets the CSV elements for the CSV elements property.withElements
(char[] aElements) Sets the CSV elements for the CSV elements property.withElements
(double[] aElements) Sets the CSV elements for the CSV elements property.withElements
(float[] aElements) Sets the CSV elements for the CSV elements property.withElements
(int[] aElements) Sets the CSV elements for the CSV elements property.withElements
(long[] aElements) Sets the CSV elements for the CSV elements property.withElements
(short[] aElements) Sets the CSV elements for the CSV elements property.withElements
(Object aElements) Sets the elements for the elements property.withElements
(Object[] aElements) Sets the elements for the elements property.withElements
(Collection<?> aElements) Sets the elements for the elements property.withElements
(Map<?, ?> aElements) Sets the elements for the elements property.
-
Field Details
-
DEFAULT_COLLECTION_HEAD
public static final char DEFAULT_COLLECTION_HEAD- See Also:
-
DEFAULT_COLLECTION_TAIL
public static final char DEFAULT_COLLECTION_TAIL- See Also:
-
-
Constructor Details
-
VerboseTextBuilder
public VerboseTextBuilder()
-
-
Method Details
-
setCollectionHead
Sets theString
to be used for the begin of a collection.- Parameters:
aHead
- The begin of a collection.
-
getCollectionHead
Gets theString
to be used for the begin of a collection.- Returns:
- The begin of a collection.
-
setCollectionTail
Sets theString
to be used for the begin of a collection.- Parameters:
aTail
- The begin of a collection.
-
getCollectionTail
gets theString
to be used for the begin of a collection.- Returns:
- The begin of a collection.
-
getElements
Gets the elements for the elements property.- Returns:
- The elements being stored by the elements property.
-
setElements
Sets the elements for the elements property.- Parameters:
aElements
- The elements to be stored by the elements property.
-
setElements
Sets the elements.- Parameters:
aElements
- the new elements
-
setElements
Sets the elements for the elements property.- Parameters:
aElements
- The elements to be stored by the elements property.
-
setElements
public void setElements(boolean[] aElements) Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
public void setElements(byte[] aElements) Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
public void setElements(short[] aElements) Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
public void setElements(int[] aElements) Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
public void setElements(long[] aElements) Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
public void setElements(float[] aElements) Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
public void setElements(double[] aElements) Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
public void setElements(char[] aElements) Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
withElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
withElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.- Returns:
- The builder for applying multiple build operations.
-
setElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
setElements
Sets the CSV elements for the CSV elements property.- Parameters:
aElements
- The CSV elements to be stored by the CSV elements property.
-
withElements
Sets the elements for the elements property.- Parameters:
aElements
- The elements to be stored by the elements property.- Returns:
- The builder for applying multiple build operations.
-
withElements
Sets the elements for the elements property.- Parameters:
aElements
- The elements to be stored by the elements property.- Returns:
- The builder for applying multiple build operations.
-
setElements
Sets the elements for the elements property.- Parameters:
aElements
- The elements to be stored by the elements property.
-
withElements
Sets the elements for the elements property.- Parameters:
aElements
- The elements to be stored by the elements property.- Returns:
- The builder for applying multiple build operations.
-
withElements
Sets the elements for the elements property.- Parameters:
aElements
- The elements to be stored by the elements property.- Returns:
- The builder for applying multiple build operations.
-
toString
TheString
being build by the builder upon the settings of the attributes. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
withCollectionHead
Sets theString
to be used for the begin of a collection.- Parameters:
aHead
- The begin of a collection.- Returns:
- This instance as of the builder pattern.
-
toString
TheString
being build by the builder upon the settings of the attributes and the provided argument. This method is to be side effect free in terms of the elements (and the verbose result) are not part of the state for this instance (from the point of view of this method). Still changing for example the elements viawithElements(Collection)
can cause side effects! For avoiding thread race conditions / side effects regarding the elements text (and the verbose result), use this method instead of the combination ofwithElements(Collection)
withtoString()
. -
asString
This method represents a shortcut for the instance methodtoString(boolean[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(byte[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(short[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(int[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(long[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(float[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(double[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(char[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Boolean[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Byte[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Short[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Integer[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Long[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Float[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Double[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Character[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(String[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Boolean[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Boolean[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Boolean[])
though with public settings. -
asString
This method represents a shortcut for the instance methodtoString(Boolean[])
though with public settings. -
asVerboseString
protected static String asVerboseString(Character aCollectionHead, Collection<?> aCollection, Character aCollectionTail) To verbose string.- Parameters:
aCollectionHead
- The head sequence for the collection.aCollection
- the collectionaCollectionTail
- The tail sequence for the collection.- Returns:
- the string
-
asVerboseString
protected static String asVerboseString(Character aCollectionHead, Map<?, ?> aMap, Character aCollectionTail) To verbose string.- Parameters:
aCollectionHead
- The head sequence for the collection.aMap
- the mapaCollectionTail
- The tail sequence for the collection.- Returns:
- the string
-