public final class DlisComponent extends Object
A DlisComponent represents one of:
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
DlisType.IDENT |
getLabel()
Return label of this component.
|
DlisType.IDENT |
getName()
Return name of this component.
|
DlisType.UVARI |
getNValues()
Return number of values of this component.
|
DlisType.OBNAME |
getObjectName()
Return object name of this component.
|
DlisType.IDENT |
getType()
Return type of this component.
|
DlisType.UNITS |
getUnit()
Return unit of this component.
|
DlisType |
getValue()
Return the first value of this component.
|
List<DlisType> |
getValues()
Return the values of this component.
|
int |
hashCode() |
static DlisComponent |
newAttributeComponent(String label,
int representationCode,
String unit)
Create a component that will act as a template attribute for a set.
|
static DlisComponent |
newObjectComponent(int origin,
String objectName)
Create a component that will act as an object within a set.
|
static DlisComponent |
newObjectComponent(int origin,
String objectName,
int copy)
Create a component that will act as an object within a set.
|
static DlisComponent |
newValueComponent(List<?> values,
int representationCode,
String unit)
Create a component that will act as a value for a set object.
|
static DlisComponent |
newValueComponent(Object value,
int representationCode,
String unit)
Create a component that will act as a value for a set object.
|
String |
toString() |
public static DlisComponent newAttributeComponent(String label, int representationCode, String unit)
label
- Attribute label. Non-null.representationCode
- Data type of corresponding object values.unit
- Unit of corresponding data values. Null if N/A.IllegalArgumentException
- If name is null or representationCode is invalid.public static DlisComponent newObjectComponent(int origin, String objectName, int copy)
origin
- The object origin. [0,>.objectName
- Object name. Non-null.copy
- Counter in case objects within the same set are otherways identical. [0,255].IllegalArgumentException
- If origin or copy is out of bounds or objectName is null.public static DlisComponent newObjectComponent(int origin, String objectName)
origin
- The object origin. [0,>.objectName
- Object name. Non-null.IllegalArgumentException
- If origin is out of bounds or objectName is null.public static DlisComponent newValueComponent(List<?> values, int representationCode, String unit)
values
- The actual values. Can contain any type of objects (and nulls);
The values will be converted to the actual representation
code in a best effort manner. Null to indicate absent.representationCode
- Data type for the values.unit
- Unit for the values. Null if N/A.IllegalArgumentException
- If values is null or empty, or representationCode is invalid.public static DlisComponent newValueComponent(Object value, int representationCode, String unit)
value
- The actual value. Null to indicate absent.representationCode
- Data type for the value.unit
- Unit for the value. Null if N/A.IllegalArgumentException
- If value is null or representationCode is invalid.public DlisType.IDENT getType()
public DlisType.IDENT getName()
public DlisType.OBNAME getObjectName()
public DlisType.IDENT getLabel()
public DlisType.UVARI getNValues()
public DlisType.UNITS getUnit()
public DlisType getValue()
public List<DlisType> getValues()
Copyright © 2024 Petroware AS - https://petroware.no