public class DefaultMap
Class DefaultMap. Provides defaultmap functionality for the Hytale server.
java.lang.Object > DefaultMap
Field Summary
defaultValue
private
V
defaultValue
Field defaultValue.
value
final
V
value
Field value.
oldValue
final
V
oldValue
Field oldValue.
Method Detail
DefaultMap
public
public
DefaultMap
(final V defaultValue)
Method DefaultMap.
- Parameters:
final VdefaultValue
getDefaultValue
public
V
getDefaultValue
()
Method getDefaultValue.
setDefaultValue
public
void
setDefaultValue
(final V defaultValue)
Method setDefaultValue.
- Parameters:
final VdefaultValue
getDelegate
public
V>
getDelegate
()
Method getDelegate.
size
public
int
size
()
Method size.
isEmpty
public
boolean
isEmpty
()
Method isEmpty.
containsKey
public
boolean
containsKey
(final Object key)
Method containsKey.
- Parameters:
final Objectkey
containsValue
public
boolean
containsValue
(final Object value)
Method containsValue.
- Parameters:
final Objectvalue
get
public
V
get
(@Nullable final Object key)
Method get.
- Parameters:
@Nullable final Objectkey
put
public
V
put
(final K key, final V value)
Method put.
- Parameters:
final Kkeyfinal Vvalue
IllegalArgumentException
public
new
IllegalArgumentException
("Attachment (" + String.valueOf(key)
Method IllegalArgumentException.
- Parameters:
"Attachment (" +String.valueOf(key
remove
public
V
remove
(final Object key)
Method remove.
- Parameters:
final Objectkey
putAll
public
void
putAll
(@Nonnull final Map extends K, ? extends V> m)
Method putAll.
- Parameters:
@Nonnull final Map extends K, ? extends V>m
clear
public
void
clear
()
Method clear.
keySet
public
Set
keySet
()
Method keySet.
values
public
Collection
values
()
Method values.
entrySet
public
>
entrySet
()
Method entrySet.
equals
public
boolean
equals
(@Nullable final Object o)
Method equals.
- Parameters:
@Nullable final Objecto
if
public
else
if
(that.delegate == null)
Method if.
- Parameters:
that.delegate ==null
hashCode
public
int
hashCode
()
Method hashCode.
getOrDefault
public
V
getOrDefault
(final Object key, final V defaultValue)
Method getOrDefault.
- Parameters:
final Objectkeyfinal VdefaultValue
forEach
public
void
forEach
(final BiConsumer super K, ? super V> action)
Method forEach.
- Parameters:
final BiConsumer super K, ? super V>action
replaceAll
public
void
replaceAll
(final BiFunction super K, ? super V, ? extends V> function)
Method replaceAll.
- Parameters:
final BiFunction super K, ? super V, ? extends V>function
putIfAbsent
public
V
putIfAbsent
(final K key, final V value)
Method putIfAbsent.
- Parameters:
final Kkeyfinal Vvalue
replace
public
boolean
replace
(final K key, final V oldValue, final V newValue)
Method replace.
- Parameters:
final Kkeyfinal VoldValuefinal VnewValue
computeIfAbsent
public
V
computeIfAbsent
(final K key, @Nonnull final Function super K, ? extends V> mappingFunction)
Method computeIfAbsent.
- Parameters:
final Kkey@Nonnull final Function super K, ? extends V>mappingFunction
computeIfPresent
public
V
computeIfPresent
(final K key, @Nonnull final BiFunction super K, ? super V, ? extends V> remappingFunction)
Method computeIfPresent.
- Parameters:
final Kkey@Nonnull final BiFunction super K, ? super V, ? extends V>remappingFunction
compute
public
V
compute
(final K key, @Nonnull final BiFunction super K, ? super V, ? extends V> remappingFunction)
Method compute.
- Parameters:
final Kkey@Nonnull final BiFunction super K, ? super V, ? extends V>remappingFunction
merge
public
V
merge
(final K key, @Nonnull final V value, @Nonnull final BiFunction super V, ? super V, ? extends V> remappingFunction)
Method merge.
- Parameters:
final Kkey@Nonnull final Vvalue@Nonnull final BiFunction super V, ? super V, ? extends V>remappingFunction
toString
public
String
toString
()
Method toString.