public final class WitsmlCurve extends Object
A log curve consist of measurement data of a specific type. The curve may have one or more dimensions.
Constructor and Description |
---|
WitsmlCurve(String name,
String description,
String quantity,
String unit,
Class<?> valueType,
int nDimensions)
Create a WITSML curve instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(int dimension,
Object value)
Add a value to this curve.
|
void |
addValue(Object value)
Add a value to this curve.
|
void |
clear()
Remove all values from this curve.
|
String |
getDescription()
Return description of this curve.
|
String |
getName()
Return name of this curve.
|
int |
getNDimensions()
Return the number of dimensions of this curve.
|
int |
getNValues()
Return the number of values in this curve.
|
String |
getQuantity()
Return quantity of the data of this curve.
|
Object[] |
getRange()
Return the range (i.e. the min and max value) of this curve.
|
Statistics |
getStatistics()
Return curve statistics.
|
String |
getUnit()
Return unit of measure of the data of this curve.
|
Object |
getValue(int index)
Return a specific value from this curve.
|
Object |
getValue(int dimension,
int index)
Return a specific value from the given dimension of this curve.
|
Class<?> |
getValueType()
Return the value type for the data of this curve,
typically Double.class, Integer.class, String.class, etc.
|
String |
toString() |
public WitsmlCurve(String name, String description, String quantity, String unit, Class<?> valueType, int nDimensions)
name
- Name (mnemonic) of curve. Non-null.description
- Curve long name or description. May be null if not provided.quantity
- Quantity of the curve data. Null if unknown or N/A.unit
- Unit of measure for the curve data. Null if unitless.valueType
- Value type of curve data.nDimensions
- Dimension of curve. <0,>.IllegalArgumentException
- If name or valueType is or nDimensions is out of bounds.public String getName()
public String getQuantity()
public String getUnit()
public String getDescription()
public Class<?> getValueType()
public int getNDimensions()
public void addValue(int dimension, Object value)
dimension
- Dimension index. [0,nDimensions>.value
- Value to add. Null to indicate absent.IllegalArgumentException
- If dimension is out of bounds.public void addValue(Object value)
value
- Value to add. Null to indicate absent.public int getNValues()
public Object getValue(int dimension, int index)
dimension
- Dimension index. [0,nDimensions>.index
- Position index. [0,nValues>.public Object getValue(int index)
index
- Position index. [0,nValues>.IllegalArgumentException
- If index is out of bounds.public Object[] getRange()
If the curve is multi-dimensional, the range is reported across all dimensions.
public Statistics getStatistics()
public void clear()
Copyright © 2024 Petroware AS - https://petroware.no