SequencePrinter<T> class
Prints a sequence of printers.
- Inheritance
- Implementers
- Available extensions
Constructors
-
SequencePrinter.new(Iterable<
Printer< printers)T> > -
const
Properties
- defaultToStringPrinter → ObjectPrinter
-
Override to configure the empty ObjectPrinter.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
printers
→ Iterable<
Printer< T> > -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toStringPrinter → ObjectPrinter
-
Override and call super to add values to the ObjectPrinter.
no setteroverride
Methods
-
after(
Object other) → Printer< T> -
Available on Printer<
Prints something after another printer.T> , provided by the SequencePrinterPrinterExtension extension -
around(
Object first, [Object? second]) → Printer< T> -
Available on Printer<
Prints something before and after another printer.T> , provided by the SequencePrinterPrinterExtension extension -
before(
Object other) → Printer< T> -
Available on Printer<
Prints before another printer.T> , provided by the SequencePrinterPrinterExtension extension -
call(
T object) → String -
Prints the
object
.inherited -
cast<
T> () → Printer< T> -
Available on Printer<
Returns a printer that accepts values of typeR> , provided by the ResultOfPrinterExtension extensionT
and casts them toR
for printing. -
ifEmpty(
[String label = '\u2205']) → Printer< Iterable< T> > -
Available on Printer<
PrintsIterable< , provided by the EmptyPrinterExtension extensionT> >label
, if the iterable to be printed is empty. Uses the unicode symbol for empty set by default: https://unicode-table.com/en/2205/. -
ifNull(
[String label = '\u2400']) → Printer< T?> -
Available on Printer<
PrintsT> , provided by the NullPrinterExtension extensionlabel
, if the object to be printed is null. Uses the unicode symbol for null by default: https://unicode-table.com/en/2400/. -
iterable(
{Printer< Iterable< ? emptyPrinter, Printer<T> >Iterable< ? beforePrinter, Printer<T> >Iterable< ? afterPrinter, String separator = ', ', String? lastSeparator, int? leadingItems, int? trailingItems, String? ellipses = '\u2026'}) → Printer<T> >Iterable< T> > -
Available on Printer<
Joins the items in an Iterable with a separator, and possibly limits the total amount of items to be printed.T> , provided by the IterablePrinterExtension extension -
mapIf(
bool condition, Printer< T> callback(Printer<T> printer)) → Printer<T> -
Available on Printer<
Helper to modify a printer with aT> , provided by the BuilderPrinterExtension extensioncallback
, if acondition
is met. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onResultOf<
T> (Map1< T, R> function) → Printer<T> -
Available on Printer<
Returns a printer that accepts values of typeR> , provided by the ResultOfPrinterExtension extensionT
and invokes the providedfunction
to transform it to typeR
for printing. -
padBoth(
int width, [String padding = ' ']) → Printer< T> -
Available on Printer<
Pads the string on the left and right if it is shorter thanT> , provided by the PadPrinterExtension extensionwidth
. -
padLeft(
int width, [String padding = ' ']) → Printer< T> -
Available on Printer<
Pads the string on the left if it is shorter thanT> , provided by the PadPrinterExtension extensionwidth
. -
padRight(
int width, [String padding = ' ']) → Printer< T> -
Available on Printer<
Pads the string on the right if it is shorter thanT> , provided by the PadPrinterExtension extensionwidth
. -
print(
T object) → String -
Returns the printed
object
.inherited -
printOn(
T object, StringBuffer buffer) → void -
Prints the
object
intobuffer
.override -
separateLeft(
int width, int offset, String separator) → Printer< T> -
Available on Printer<
Separates a string from the left side with aT> , provided by the SeparatePrinterExtension extensionseparator
everywidth
characters. -
separateRight(
int width, int offset, String separator) → Printer< T> -
Available on Printer<
Separates a string from the right side with aT> , provided by the SeparatePrinterExtension extensionseparator
everywidth
characters. -
skip(
int count) → Printer< T> -
Available on Printer<
Skips all but the firstT> , provided by the TakeSkipPrinterExtension extensioncount
characters. -
skipLast(
int count) → Printer< T> -
Available on Printer<
Skips all but the lastT> , provided by the TakeSkipPrinterExtension extensioncount
characters. -
take(
int count) → Printer< T> -
Available on Printer<
Takes the firstT> , provided by the TakeSkipPrinterExtension extensioncount
characters. -
takeLast(
int count) → Printer< T> -
Available on Printer<
Takes the lastT> , provided by the TakeSkipPrinterExtension extensioncount
characters. -
toString(
) → String -
Standard Object.toString implementation. Do not override, instead
implement toStringPrinter to customize.
inherited
-
trim(
) → Printer< T> -
Available on Printer<
Removes any leading and trailing whitespace.T> , provided by the TrimPrinterExtension extension -
trimLeft(
) → Printer< T> -
Available on Printer<
Removes any leading whitespace.T> , provided by the TrimPrinterExtension extension -
trimRight(
) → Printer< T> -
Available on Printer<
Removes any trailing whitespace.T> , provided by the TrimPrinterExtension extension -
truncateCenter(
int width, {String ellipsis = defaultEllipsis, TruncateMethod method = TruncateMethod.characters}) → Printer< T> -
Available on Printer<
Truncates the string from the center if it is longer than width.T> , provided by the TruncatePrinterExtension extension -
truncateLeft(
int width, {String ellipsis = defaultEllipsis, TruncateMethod method = TruncateMethod.characters}) → Printer< T> -
Available on Printer<
Truncates the string from the left side if it is longer than width.T> , provided by the TruncatePrinterExtension extension -
truncateRight(
int width, {String ellipsis = defaultEllipsis, TruncateMethod method = TruncateMethod.characters}) → Printer< T> -
Available on Printer<
Truncates the string from the right side if it is longer than width.T> , provided by the TruncatePrinterExtension extension -
where(
Predicate1< T> callback) → Printer<T> -
Available on Printer<
Returns a printer that only prints the receiver if theT> , provided by the WherePrinterExtension extensioncallback
evaluates totrue
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited