Top Description Fields Constructors Methods
org.jabref.logic.layout.format

public Class Default

extends Object
implements ParamLayoutFormatter
Class Inheritance
All Implemented Interfaces
org.jabref.logic.layout.ParamLayoutFormatter, org.jabref.logic.layout.LayoutFormatter
Imports
org.jabref.logic.layout.ParamLayoutFormatter

Layout formatter that puts in a default value (given as argument) if the field is empty. Empty means null or an empty string.

Field Summary

Modifier and TypeField and Description
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
format(String
The text to layout.
fieldText
)

Implements org.jabref.logic.layout.LayoutFormatter.format.

Failure Mode:

Formatters should be robust in the sense that they always return some relevant string.

public void
setArgument(String
A String argument.
arg
)

Implements org.jabref.logic.layout.ParamLayoutFormatter.setArgument.

Method for setting the argument of this formatter.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defValueback to summary
private String defValue

Constructor Detail

Defaultback to summary
public Default()

Method Detail

formatback to summary
public String format(String fieldText)

Implements org.jabref.logic.layout.LayoutFormatter.format.

Doc from org.jabref.logic.layout.LayoutFormatter.format.

Failure Mode:

Formatters should be robust in the sense that they always return some relevant string.

If the formatter can detect an invalid input it should return the original string otherwise it may simply return a wrong output.

Parameters
fieldText:String

The text to layout.

Returns:String

The layouted text.

Annotations
@Override
setArgumentback to summary
public void setArgument(String arg)

Implements org.jabref.logic.layout.ParamLayoutFormatter.setArgument.

Doc from org.jabref.logic.layout.ParamLayoutFormatter.setArgument.

Method for setting the argument of this formatter.

Parameters
arg:String

A String argument.

Annotations
@Override