Top Description Fields Constructors Methods
io.github.kusoroadeolu.clique.configuration

public sealed Enum ProgressBarPreset

extends Enum<ProgressBarPreset>
Class Inheritance
Annotations
@Stable
since:3.2.0
Imports
io.github.kusoroadeolu.clique.internal.documentation.Stable

Predefined ProgressBarConfiguration presets with sensible defaults.

Each constant returns a fully built ProgressBarConfiguration via getConfiguration(). Presets can be used directly or as a starting point for further customization via ProgressBarConfiguration#fromPreset(ProgressBarPreset).

Available presets and their default values:

Preset defaults
PresetLengthCompleteIncompleteFormat
BLOCKS40█░:bar :percent% [:elapsed/:remaining]
LINES50▂▁:bar :percent%
BOLD40▰▱:bar :percent% | :progress/:total
CLASSIC50#=[:bar] :percent% [:elapsed]
DOTS50●○:bar :percent%

Example — customizing a preset:

ProgressBarConfiguration config = ProgressBarConfiguration.fromPreset(ProgressBarPreset.CLASSIC)
    .length(60)
    .build();
Since
3.0.0

Field Summary

Modifier and TypeField and Description
public static final ProgressBarPreset
BLOCKS

Block-style bar using █ and ░ characters.

public static final ProgressBarPreset
BOLD

Bold-style bar using ▰ and ▱ characters.

public static final ProgressBarPreset
CLASSIC

Classic ASCII bar using # and = characters.

public static final ProgressBarPreset
DOTS

Dot-style bar using ● and ○ characters.

public static final ProgressBarPreset
LINES

Line-style bar using ▂ and ▁ characters.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public abstract ProgressBarConfiguration

Returns:

a new ProgressBarConfiguration; never null
getConfiguration
()

Returns a new ProgressBarConfiguration built from this preset's defaults.

public static ProgressBarPreset
public static ProgressBarPreset[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BLOCKSback to summary
public static final ProgressBarPreset BLOCKS

Block-style bar using █ and ░ characters. Format: :bar :percent% [:elapsed/:remaining]. This is the preset used by ProgressBarConfiguration#DEFAULT.

BOLDback to summary
public static final ProgressBarPreset BOLD

Bold-style bar using ▰ and ▱ characters. Format: :bar :percent% | :progress/:total.

CLASSICback to summary
public static final ProgressBarPreset CLASSIC

Classic ASCII bar using # and = characters. Format: [:bar] :percent% [:elapsed].

DOTSback to summary
public static final ProgressBarPreset DOTS

Dot-style bar using ● and ○ characters. Format: :bar :percent%.

LINESback to summary
public static final ProgressBarPreset LINES

Line-style bar using ▂ and ▁ characters. Format: :bar :percent%.

Constructor Detail

ProgressBarPresetback to summary
private ProgressBarPreset()

Method Detail

getConfigurationback to summary
public abstract ProgressBarConfiguration getConfiguration()

Returns a new ProgressBarConfiguration built from this preset's defaults.

Each call returns a distinct instance. To customize a preset's values, use ProgressBarConfiguration#fromPreset(ProgressBarPreset) instead, which returns a pre-seeded builder.

Returns:ProgressBarConfiguration

a new ProgressBarConfiguration; never null

valueOfback to summary
public static ProgressBarPreset valueOf(String name)
valuesback to summary
public static ProgressBarPreset[] values()