public class NullEmptyHandlerDefault extends Object implements INullEmptyHandler
| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY
Default empty String markup.
|
protected String |
emptyVal
The empty string mark.
|
protected static ThreadLocal<INullEmptyHandler> |
instance
Thread safe instance.
|
static String |
NULL
Default empty String markup.
|
protected String |
nullVal
The empty string mark.
|
| Constructor and Description |
|---|
NullEmptyHandlerDefault() |
| Modifier and Type | Method and Description |
|---|---|
String |
emptyValue(EMode mode)
Empty value for a given mode.
|
static INullEmptyHandler |
get()
Singleton method.
|
String |
getEmptyVal()
Return the empty constant.
|
String |
getNullVal()
Get null explicit representation.
|
boolean |
isEmpty(EMode mode,
String value)
Check if a value should be handled as empty, depending on value and mode.
|
boolean |
isNull(EMode mode,
String value)
Check if a value should be handled as null, depending on value and mode.
|
String |
nullValue(EMode mode)
Null value for a given mode.
|
void |
setEmptyVal(String empty)
Set empty mark.
|
void |
setNullVal(String nullval)
Set null explicit representation.
|
protected static ThreadLocal<INullEmptyHandler> instance
public static final String NULL
protected String nullVal
public static final String EMPTY
protected String emptyVal
public static INullEmptyHandler get()
public String getNullVal()
public void setNullVal(String nullval)
nullval - Null representation.public String getEmptyVal()
public void setEmptyVal(String empty)
empty - Empty mark.public String nullValue(EMode mode)
INullEmptyHandlernullValue in interface INullEmptyHandlermode - A mode.public String emptyValue(EMode mode)
INullEmptyHandleremptyValue in interface INullEmptyHandlermode - A mode.public boolean isNull(EMode mode, String value)
INullEmptyHandlerisNull in interface INullEmptyHandlermode - A mode.value - A value.public boolean isEmpty(EMode mode, String value)
INullEmptyHandlerisEmpty in interface INullEmptyHandlermode - A mode.value - A value.Copyright © 2016. All rights reserved.