public class BeforeAfter
extends java.lang.Object
Constructor and Description |
---|
BeforeAfter()
Default constructor: Create with empty strings
|
BeforeAfter(java.lang.String sBefore1,
java.lang.String sAfter1)
Constructor to initialize the object with a pair of strings
|
Modifier and Type | Method and Description |
---|---|
void |
add(BeforeAfter ba)
Add the content of another
BeforeAfter to this BeforeAfter
The new data will be be added "inside" |
void |
add(java.lang.String sBefore1,
java.lang.String sAfter1)
Add data to the
BeforeAfter
The new data will be be added "inside", thus for example
add("\textsf{","}");
add("\textit{","}");
will create the pair \textsf{\textit{ , }} |
void |
enclose(java.lang.String sBefore1,
java.lang.String sAfter1)
Add data to the
BeforeAfter
The new data will be be added "outside", thus for example
enclose("\textsf{","}");
enclose("\textit{","}");
will create the pair \textit{\textsf{ , }} |
java.lang.String |
getAfter()
Get LaTeX code to put after
|
java.lang.String |
getBefore()
Get LaTeX code to put before
|
boolean |
isEmpty()
Check if this
BeforeAfter contains any data |
public BeforeAfter(java.lang.String sBefore1, java.lang.String sAfter1)
sBefore1
- LaTeX code to put beforesAfter1
- LaTeX code to put afterpublic BeforeAfter()
public void add(java.lang.String sBefore1, java.lang.String sAfter1)
Add data to the BeforeAfter
The new data will be be added "inside", thus for example
add("\textsf{","}");
add("\textit{","}");
will create the pair \textsf{\textit{
, }}
sBefore1
- LaTeX code to put beforesAfter1
- LaTeX code to put afterpublic void enclose(java.lang.String sBefore1, java.lang.String sAfter1)
Add data to the BeforeAfter
The new data will be be added "outside", thus for example
enclose("\textsf{","}");
enclose("\textit{","}");
will create the pair \textit{\textsf{
, }}
sBefore1
- LaTeX code to put beforesAfter1
- LaTeX code to put afterpublic void add(BeforeAfter ba)
Add the content of another BeforeAfter
to this BeforeAfter
The new data will be be added "inside"
ba
- the code to addpublic java.lang.String getBefore()
public java.lang.String getAfter()
public boolean isEmpty()
BeforeAfter
contains any data