public final class LasCurve extends Object
Constructor and Description |
---|
LasCurve(String name,
String unit,
String description,
Class<?> valueType,
int nDimensions)
Create a new LAS curve instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(int dimension,
Object value)
Add the specified value to the end of this curve.
|
void |
addValue(Object value)
Add the specified value to the end of (the first dimension of)
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 number of values in this curve.
|
Object[] |
getRange()
Return range (i.e min and max) of this curve.
|
Statistics |
getStatistics()
Return curve statistics.
|
String |
getUnit()
Return unit of measurement for the values of this curve.
|
Object |
getValue(int index)
Return curve value of the specified index.
|
Object |
getValue(int dimension,
int index)
Return curve value of the specified index.
|
Class<?> |
getValueType()
Return data type of the values of this curve.
|
String |
toString() |
public LasCurve(String name, String unit, String description, Class<?> valueType, int nDimensions)
name
- Curve name. Non-null.unit
- Data unit. Null if unitless or unknown.description
- Curve description. Null if none provided.valueType
- Data type of the values of the curve. Non-null.nDimensions
- Number of dimensions in curve. [1,>.IllegalArgumentException
- If name of valueType is null or
nDimensions is invalid.public String getName()
public String getUnit()
public String getDescription()
public Class<?> getValueType()
public int getNDimensions()
public void addValue(int dimension, Object value)
The value may be a string or any other type, but it will be converted to the value type of this curve internally.
dimension
- Dimension index. [0,nDimensions>.value
- Value to add. May be null to
indicate no-value or absent.IllegalArgumentException
- If dimensions is out of bounds.public void addValue(Object value)
The value may be a string or any other type, but it will be converted to the value type of this curve internally.
This is equivalent of calling addValue(0, value).
value
- Value to add. May be null to indicate no-value or absent.public int getNValues()
public Object getValue(int dimension, int index)
dimension
- Dimension index. [0,nDimensions>.index
- Index to return value from. [0,nValues>.public Object getValue(int index)
Equivalent to getValue(0, index).
index
- Index to return value from. [0,nValues>.public Object[] getRange()
If the curve is multidimensional, the range is reported across all dimensions.
public Statistics getStatistics()
LasFileReader.read(boolean,boolean)
public void clear()
Copyright © 2024 Petroware AS - https://petroware.no