Package de.isas.mztab2.model
Class IndexedElementImpl
- java.lang.Object
-
- de.isas.mztab2.model.IndexedElementImpl
-
- All Implemented Interfaces:
IndexedElement
public class IndexedElementImpl extends Object implements IndexedElement
Implementation of IndexedElement where more information is required than just the id. Wraps the actual object and exposes it viagetPayload().- Author:
- nilshoffmann
-
-
Constructor Summary
Constructors Constructor Description IndexedElementImpl(Integer id, String elementType, Object payload)Create a new indexed element implementation for the provided id, element type and payload.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetElementType()Returns the element type string.IntegergetId()Returns the id of the indexed element.ObjectgetPayload()Returns the wrapped object.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
IndexedElementImpl
public IndexedElementImpl(Integer id, String elementType, Object payload)
Create a new indexed element implementation for the provided id, element type and payload.- Parameters:
id- the id.elementType- the element type string.payload- the payload, any indexed domain object.
-
-
Method Detail
-
getId
public Integer getId()
Description copied from interface:IndexedElementReturns the id of the indexed element. May be null.- Specified by:
getIdin interfaceIndexedElement- Returns:
- the id.
-
getElementType
public String getElementType()
Returns the element type string. This is used by MetadataElement in thejmztabm-io
module.- Returns:
- the element type string.
-
getPayload
public Object getPayload()
Returns the wrapped object.- Returns:
- the payload.
-
-