Package spoon.support.util
Class ImmutableMapImpl
java.lang.Object
spoon.support.util.ImmutableMapImpl
- All Implemented Interfaces:
ImmutableMap
Internal class only, not in the public API.
Spoon implementation of
ImmutableMap
-
Field Details
-
parent
-
map
-
-
Constructor Details
-
ImmutableMapImpl
-
ImmutableMapImpl
-
ImmutableMapImpl
public ImmutableMapImpl()
-
-
Method Details
-
checkpoint
- Specified by:
checkpoint
in interfaceImmutableMap
- Returns:
- a new instance of
ImmutableMap
, which inherits all values from thisImmutableMap
Any call ofImmutableMap.putValue(String, Object)
is remembered in local Map of parameters. At the end of process theImmutableMap.getModifiedValues()
can be used to return all the parameters which were changed after localImmutableMap
was created
-
hasValue
- Specified by:
hasValue
in interfaceImmutableMap
- Parameters:
parameterName
- to be checked parameter name- Returns:
- true if there is defined some value for the parameter. null can be a value too
-
getValue
- Specified by:
getValue
in interfaceImmutableMap
- Parameters:
parameterName
- the name of the parameter- Returns:
- a value of the parameter under the name `parameterNamer
-
putValue
- Specified by:
putValue
in interfaceImmutableMap
- Parameters:
parameterName
- to be set parameter namevalue
- the new value- Returns:
- copies this
ImmutableMap
, sets the new value there and returns that copy
-
toString
-
asMap
- Specified by:
asMap
in interfaceImmutableMap
- Returns:
- underlying unmodifiable Map<String, Object>
-
getModifiedValues
- Specified by:
getModifiedValues
in interfaceImmutableMap
- Returns:
- the modified parameters since last call to
ImmutableMap.checkpoint()
-
equals
-