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 boolean
equals(Object o)
String
getElementType()
Returns the element type string.Integer
getId()
Returns the id of the indexed element.Object
getPayload()
Returns the wrapped object.int
hashCode()
String
toString()
-
-
-
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:IndexedElement
Returns the id of the indexed element. May be null.- Specified by:
getId
in 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.
-
-