Package com.pnfsoftware.jeb.core.units
Class MetadataGroup
java.lang.Object
com.pnfsoftware.jeb.core.units.AbstractMetadataGroup
com.pnfsoftware.jeb.core.units.MetadataGroup
- All Implemented Interfaces:
IMetadataGroup
A simple implementation of a metadata group. Internally, data is stored in a hashmap. This object
is serializable if and only if the objects
added
to it are
themselves serializable.-
Field Summary
Fields inherited from class com.pnfsoftware.jeb.core.units.AbstractMetadataGroup
name, type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a read-only map of all the key-value pairs of metadata items contained in this group.Get the piece of metadata associated with the provided address.getData
(String address, AddressConversionPrecision precision) Get the piece of metadata associated with the provided address.Retrieve the list of addresses that represent the start/change of a section, null if none.boolean
Set or remove the piece of metadata associated with the given address.Methods inherited from class com.pnfsoftware.jeb.core.units.AbstractMetadataGroup
getName, getType
-
Constructor Details
-
MetadataGroup
-
-
Method Details
-
getAllData
Description copied from interface:IMetadataGroup
Get a read-only map of all the key-value pairs of metadata items contained in this group. Not all groups may be able to provide this functionality. If so, this method should return null.- Returns:
- a map of key-value pairs, possibly empty; if the operation is not supported, null is returned
-
getData
Description copied from interface:IMetadataGroup
Get the piece of metadata associated with the provided address.- Parameters:
address
- addressprecision
- precision of the input address.AddressConversionPrecision.COARSE
will use raw references (may fasten result)- Returns:
- the data at address, null if none
-
getData
Description copied from interface:IMetadataGroup
Get the piece of metadata associated with the provided address.- Parameters:
address
- address- Returns:
- the data at address, null if none
-
setData
Description copied from interface:IMetadataGroup
Set or remove the piece of metadata associated with the given address.- Parameters:
address
- addressdata
- metadata, use null to remove- Returns:
- true if the operation succeeded; false otherwise (eg, the operation is not supported)
-
getSectionAnchorIds
Description copied from interface:IMetadataGroup
Retrieve the list of addresses that represent the start/change of a section, null if none.- Returns:
- the list of addresses
-