Package org.onosproject.ui.table.cell
Class AbstractCellFormatter
- java.lang.Object
-
- org.onosproject.ui.table.cell.AbstractCellFormatter
-
- All Implemented Interfaces:
CellFormatter
- Direct Known Subclasses:
AppIdFormatter
,ConnectPointFormatter
,DefaultCellFormatter
,EnumFormatter
,HexFormatter
,HexLongFormatter
,HostLocationFormatter
,NumberFormatter
,TimeFormatter
public abstract class AbstractCellFormatter extends Object implements CellFormatter
Base implementation of aCellFormatter
. This class takes care of dealing with null inputs; subclasses should implement their format method knowing that the input is guaranteed to be non-null.
-
-
Constructor Summary
Constructors Constructor Description AbstractCellFormatter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
format(Object value)
Formats the specified value into a string appropriate for displaying in a table cell.protected abstract String
nonNullFormat(Object value)
Formats the specified value into a string appropriate for displaying in a table cell.
-
-
-
Field Detail
-
EMPTY
protected static final String EMPTY
- See Also:
- Constant Field Values
-
SLASH
protected static final String SLASH
- See Also:
- Constant Field Values
-
QUERY
protected static final String QUERY
- See Also:
- Constant Field Values
-
UNDERSCORE
protected static final String UNDERSCORE
- See Also:
- Constant Field Values
-
SPACE
protected static final String SPACE
- See Also:
- Constant Field Values
-
OX
protected static final String OX
- See Also:
- Constant Field Values
-
-
Method Detail
-
format
public String format(Object value)
Description copied from interface:CellFormatter
Formats the specified value into a string appropriate for displaying in a table cell. Note that null values are acceptable, and will result in the empty string.- Specified by:
format
in interfaceCellFormatter
- Parameters:
value
- the value- Returns:
- the formatted string
-
-