public class BasicFieldOutput extends Object implements FieldOutput
FieldOutput
.FieldOutput.Option
Constructor and Description |
---|
BasicFieldOutput() |
Modifier and Type | Method and Description |
---|---|
StringBuilder |
acquireBuffer()
Acquires the internal buffer.
|
FieldOutput |
addOption(FieldOutput.Option option)
Adds an option of this output.
|
FieldOutput |
addOptions(FieldOutput.Option... opts)
Adds options of this output.
|
CharSequence |
get()
Returns the output contents.
|
List<FieldOutput.Option> |
getOptions()
Returns the options of this output.
|
FieldOutput |
put(CharSequence contents)
Adds a content into this output.
|
FieldOutput |
put(CharSequence contents,
int start,
int end)
Adds a content into this output.
|
void |
putNull()
Sets this field as
NULL . |
void |
releaseBuffer(StringBuilder acquired)
Releases the
acquired buffer. |
BasicFieldOutput |
reset()
Clears the last output.
|
BasicFieldOutput |
set(CharSequence contents)
Clears the last output and set the contents.
|
String |
toString() |
public BasicFieldOutput reset()
public BasicFieldOutput set(CharSequence contents)
contents
- the contents (nullable)public CharSequence get()
FieldOutput
get
in interface FieldOutput
null
if this output was set as null
public List<FieldOutput.Option> getOptions()
FieldOutput
getOptions
in interface FieldOutput
public void putNull()
FieldOutput
NULL
.putNull
in interface FieldOutput
public FieldOutput put(CharSequence contents, int start, int end)
FieldOutput
put
in interface FieldOutput
contents
- the contentstart
- the beginning index (inclusive)end
- the ending index (exclusive)public FieldOutput put(CharSequence contents)
FieldOutput
put
in interface FieldOutput
contents
- the contentpublic FieldOutput addOption(FieldOutput.Option option)
FieldOutput
addOption
in interface FieldOutput
option
- the optionspublic FieldOutput addOptions(FieldOutput.Option... opts)
FieldOutput
addOptions
in interface FieldOutput
opts
- the optionspublic StringBuilder acquireBuffer()
FieldOutput
acquireBuffer
in interface FieldOutput
public void releaseBuffer(StringBuilder acquired)
FieldOutput
acquired
buffer.releaseBuffer
in interface FieldOutput
acquired
- the buffer to releaseCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.