public class Divider extends Object
Modifier and Type | Field and Description |
---|---|
static char |
DEFAULT_CHARACTER
The default character used in the divider, if not otherwise specified in the constructor.
|
static int |
DEFAULT_NUMBER_CHARACTERS_IN_BANNER
The default total nubmer of characters to use in the divier, if not otherwise specified in
the constructor.
|
Constructor and Description |
---|
Divider()
A banner using dashes.
|
Divider(char characterToRepeat)
A banner using a particular repeated character.
|
Divider(char characterToRepeat,
int numberCharactersInBanner)
A banner using a particular repeated character.
|
Divider(int numberCharactersInBanner)
A banner using dashes, with a particular number of characters.
|
Modifier and Type | Method and Description |
---|---|
String |
withLabel(String label)
Creates a line of repeated dashes with a centered label of text.
|
String |
withoutLabel()
Creates a line of repeated dashes.
|
public static final char DEFAULT_CHARACTER
public static final int DEFAULT_NUMBER_CHARACTERS_IN_BANNER
public Divider()
public Divider(int numberCharactersInBanner)
numberCharactersInBanner
- the number of characters in the banner.public Divider(char characterToRepeat)
characterToRepeat
- the character that is repeated.public Divider(char characterToRepeat, int numberCharactersInBanner)
characterToRepeat
- the character that is repeated.numberCharactersInBanner
- the number of characters in the banner.public String withoutLabel()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.