Class AbstractConfig.EntryWrapper
- java.lang.Object
-
- com.electronwill.nightconfig.core.AbstractConfig.EntryWrapper
-
- All Implemented Interfaces:
Config.Entry,UnmodifiableConfig.Entry
- Direct Known Subclasses:
AbstractCommentedConfig.CommentedEntryWrapper
- Enclosing class:
- AbstractConfig
protected static class AbstractConfig.EntryWrapper extends java.lang.Object implements Config.Entry
A wrapper around aMap.Entry<String, Object>.- See Also:
Map.Entry
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map.Entry<java.lang.String,java.lang.Object>mapEntry
-
Constructor Summary
Constructors Constructor Description EntryWrapper(java.util.Map.Entry<java.lang.String,java.lang.Object> mapEntry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetKey()<T> TgetRawValue()Returns the entry's value without convertingNullObject.NULL_OBJECTtonull.inthashCode()<T> TsetValue(java.lang.Object value)Sets the entry's value.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.electronwill.nightconfig.core.UnmodifiableConfig.Entry
getByte, getByteOrElse, getChar, getCharOrElse, getInt, getIntOrElse, getLong, getLongOrElse, getOptional, getOptionalInt, getOptionalLong, getOrElse, getShort, getShortOrElse, getValue, isNull
-
-
-
-
Method Detail
-
getKey
public java.lang.String getKey()
- Specified by:
getKeyin interfaceUnmodifiableConfig.Entry- Returns:
- the entry's key
-
getRawValue
public <T> T getRawValue()
Description copied from interface:UnmodifiableConfig.EntryReturns the entry's value without convertingNullObject.NULL_OBJECTtonull.- Specified by:
getRawValuein interfaceUnmodifiableConfig.Entry- Type Parameters:
T- the value's type- Returns:
- the entry's value
-
setValue
public <T> T setValue(java.lang.Object value)
Description copied from interface:Config.EntrySets the entry's value.- Specified by:
setValuein interfaceConfig.Entry- Type Parameters:
T- the type of the old value- Parameters:
value- the value to set- Returns:
- the previous value
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-