Package org.neo4j.graphalgo.core.loading
Class NodePropertyMap
- java.lang.Object
-
- org.neo4j.graphalgo.core.loading.NodePropertyMap
-
- All Implemented Interfaces:
NodeProperties
public final class NodePropertyMap extends java.lang.Object implements NodeProperties
-
-
Constructor Summary
Constructors Constructor Description NodePropertyMap(PagedLongDoubleMap properties, double defaultValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.OptionalLong
getMaxPropertyValue()
double
nodeProperty(long nodeId)
Returns the property value for a node or the loaded default value if no property has been defined.double
nodeProperty(long nodeId, double defaultValue)
Returns the property value for a node or the given default value if no property had been defined.long
release()
Release internal data structures and return an estimate how many bytes were freed.long
size()
-
-
-
Constructor Detail
-
NodePropertyMap
public NodePropertyMap(PagedLongDoubleMap properties, double defaultValue)
-
-
Method Detail
-
nodeProperty
public double nodeProperty(long nodeId)
Description copied from interface:NodeProperties
Returns the property value for a node or the loaded default value if no property has been defined.- Specified by:
nodeProperty
in interfaceNodeProperties
-
nodeProperty
public double nodeProperty(long nodeId, double defaultValue)
Description copied from interface:NodeProperties
Returns the property value for a node or the given default value if no property had been defined. The default value has precedence over the default value defined by the loader.- Specified by:
nodeProperty
in interfaceNodeProperties
-
getMaxPropertyValue
public java.util.OptionalLong getMaxPropertyValue()
- Specified by:
getMaxPropertyValue
in interfaceNodeProperties
- Returns:
- the maximum value contained in the mapping or an empty
OptionalLong
if the mapping is empty or the feature is not supported.
-
release
public long release()
Description copied from interface:NodeProperties
Release internal data structures and return an estimate how many bytes were freed. Note that the mapping is not usable afterwards.- Specified by:
release
in interfaceNodeProperties
-
size
public long size()
- Specified by:
size
in interfaceNodeProperties
- Returns:
- the number of values stored.
-
-