public interface Hints extends HintValue
INDEX_OVERFLOW_NEAR, INDEX_OVERFLOW_NULL, INDEX_OVERFLOW_THROW, MAX_DECIMAL_DIGITS, MIN_DECIMAL_WIDTH, MIN_DECIMAL_WIDTH_BIG, MIN_DECIMAL_WIDTH_DOUBLE, MIN_DECIMAL_WIDTH_FLOAT, MIN_INTEGER_WIDTH, MIN_INTEGER_WIDTH_BIG, MIN_INTEGER_WIDTH_BYTE, MIN_INTEGER_WIDTH_INT, MIN_INTEGER_WIDTH_LONG, MIN_INTEGER_WIDTH_SHORT, NUMBER_ROUNDING, NUMBER_ROUNDING_CEILING, NUMBER_ROUNDING_DOWN, NUMBER_ROUNDING_FLOOR, NUMBER_ROUNDING_HALF_DOWN, NUMBER_ROUNDING_HALF_EVEN, NUMBER_ROUNDING_HALF_UP, NUMBER_ROUNDING_UNNECESSARY, NUMBER_ROUNDING_UP| 限定符和类型 | 方法和说明 |
|---|---|
default void |
computeIfAbsent(String hintName,
Function<String,Object> mappingFunction)
If the specified key is not already associated with a value (or is mapped
to
null), attempts to compute its value using the given mapping
function and enters it into this map unless null. |
default void |
forEach(BiConsumer<String,Object> action)
Performs the given action for each entry in this map until all entries
have been processed or the action throws an exception.
|
Object |
getHint(String optionKey)
获取选项参数
|
String[] |
getHints()
获取选项参数
|
default Object |
getOrDefault(String hintName,
Object defaultValue)
Returns the value to which the specified key is mapped, or
defaultValue if this map contains no mapping for the key. |
default <V> V |
getOrMap(String hintName,
Function<Object,V> defaultValue)
Returns the value to which the specified key is mapped, or
defaultValue if this map contains no mapping for the key. |
default void |
putIfAbsent(String hintName,
Object value)
If the specified key is not already associated with a value (or is mapped
to
null) associates it with the given value and returns
null, else returns the current value. |
void |
removeHint(String optionKey)
删除选项参数
|
void |
setHint(String hintName,
boolean value)
设置选项参数
|
void |
setHint(String hintName,
Number value)
设置选项参数
|
void |
setHint(String hintName,
String value)
设置选项参数
|
default void |
setHints(Hints hints)
设置选项参数
|
String[] getHints()
void removeHint(String optionKey)
default void setHints(Hints hints)
void setHint(String hintName, boolean value)
default void forEach(BiConsumer<String,Object> action)
action - The action to be performed for each entryNullPointerException - if the specified action is nulldefault void putIfAbsent(String hintName, Object value)
null) associates it with the given value and returns
null, else returns the current value.hintName - key with which the specified value is to be associatedvalue - value to be associated with the specified keyUnsupportedOperationException - if the put operation is not supported by this mapdefault Object getOrDefault(String hintName, Object defaultValue)
defaultValue if this map contains no mapping for the key.
The default implementation makes no guarantees about synchronization
or atomicity properties of this method. Any implementation providing
atomicity guarantees must override this method and document its
concurrency properties.hintName - the key whose associated value is to be returneddefaultValue - the default mapping of the keydefaultValue if this map contains no mapping for the keydefault <V> V getOrMap(String hintName, Function<Object,V> defaultValue)
defaultValue if this map contains no mapping for the key.
The default implementation makes no guarantees about synchronization
or atomicity properties of this method. Any implementation providing
atomicity guarantees must override this method and document its
concurrency properties.hintName - the key whose associated value is to be returneddefaultValue - the default mapping of the keydefaultValue if this map contains no mapping for the keydefault void computeIfAbsent(String hintName, Function<String,Object> mappingFunction)
null), attempts to compute its value using the given mapping
function and enters it into this map unless null.
If the function returns null no mapping is recorded. If
the function itself throws an (unchecked) exception, the
exception is rethrown, and no mapping is recorded. The most
common usage is to construct a new object serving as an initial
mapped value or memoized result.
hintName - key with which the specified value is to be associatedmappingFunction - the function to compute a valueUnsupportedOperationException - if the put operation is not supported by this mapCopyright © 2020. All rights reserved.