public class DataTableLight extends Object implements DataTable, Cloneable
DataTable.TableConvention| Constructor and Description |
|---|
DataTableLight(String name,
DataTable.TableConvention tableConvention)
Create an empty table.
|
DataTableLight(String name,
DataTable.TableConvention tableConvention,
int[] maturities,
int[] terminations,
double[] values)
Create a table.
|
DataTableLight(String name,
DataTable.TableConvention tableConvention,
List<Integer> maturities,
List<Integer> terminations,
List<Double> values)
Create a table.
|
| Modifier and Type | Method and Description |
|---|---|
DataTableLight |
addPoint(int maturity,
int termination,
double value)
Add a point to the grid of the table.
|
DataTableLight |
addPoints(int[] maturities,
int[] terminations,
double[] values)
Add an array of points to the table.
|
DataTableLight |
clone() |
boolean |
containsEntryFor(double maturity,
double termination)
Checks whether the table has an actual entry at the specified coordinates.
|
boolean |
containsEntryFor(int maturity,
int termination)
Checks whether the table has an actual entry at the specified coordinates.
|
DataTable.TableConvention |
getConvention()
Returns the convention the table understands its coordinates in.
|
TreeSet<Integer> |
getMaturities()
Get a sorted set view of all maturities in the table.
|
TreeSet<Integer> |
getMaturitiesForTermination(int termination)
Get a sorted set view of all maturities for a speceific termination in the table.
|
String |
getName() |
LocalDate |
getReferenceDate()
The reference date of the table.
|
SchedulePrototype |
getScheduleMetaData() |
TreeSet<Integer> |
getTerminations()
Get a sorted set view of all terminations in the table.
|
TreeSet<Integer> |
getTerminationsForMaturity(int maturity)
Get a sorted set view of all terminations for a specific maturity in the table.
|
double |
getValue(double maturity,
double termination)
Returns the value of the table at a given time.
|
double |
getValue(int maturity,
int termination)
Returns the value of the table at a given time.
|
int |
size() |
String |
toString() |
String |
toString(double unit)
Transforms the table into a human readable String.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitexportTablepublic DataTableLight(String name, DataTable.TableConvention tableConvention)
name - The name of the table.tableConvention - The convention of the table.public DataTableLight(String name, DataTable.TableConvention tableConvention, int[] maturities, int[] terminations, double[] values)
name - The name of the table.tableConvention - The convention of the table.maturities - The maturities of the points as offset with respect to the reference date.terminations - The terminations of the points as offset with respect to the maturity date.values - The values at the points.public DataTableLight(String name, DataTable.TableConvention tableConvention, List<Integer> maturities, List<Integer> terminations, List<Double> values)
name - The name of the table.tableConvention - The convention of the table.maturities - The maturities of the points as offset with respect to the reference date.terminations - The terminations of the points as offset with respect to the maturity date.values - The values at the points.public DataTableLight addPoint(int maturity, int termination, double value)
DataTableaddPoint in interface DataTablematurity - The maturity of the point as offset with respect to the reference date.termination - The termination of the point as offset with respect to the maturity date.value - The value at the point.public DataTableLight addPoints(int[] maturities, int[] terminations, double[] values)
DataTableaddPoints in interface DataTablematurities - The maturities of the points as offset with respect to the reference date.terminations - The terminations of the points as offset with respect to the maturity date.values - The values at the points.public double getValue(int maturity,
int termination)
DataTablepublic boolean containsEntryFor(int maturity,
int termination)
DataTablegetValue on these coordinates as the table may interpolate/extrapolate.containsEntryFor in interface DataTablematurity - The maturity as offset with respect to the reference date.termination - The termination as offset with respect to the maturity date.public TreeSet<Integer> getMaturities()
DataTablegetMaturities in interface DataTablepublic TreeSet<Integer> getTerminations()
DataTablegetTerminations in interface DataTablepublic TreeSet<Integer> getTerminationsForMaturity(int maturity)
DataTablegetTerminationsForMaturity in interface DataTablematurity - The maturity for which to get the terminations.public TreeSet<Integer> getMaturitiesForTermination(int termination)
DataTablegetMaturitiesForTermination in interface DataTabletermination - The termination for which to get the maturities.public String getName()
public DataTable.TableConvention getConvention()
DataTablegetConvention in interface DataTablepublic DataTableLight clone()
public String toString(double unit)
unit - A value with which each entry of the table is multiplied before displaying.public int size()
public double getValue(double maturity,
double termination)
DataTablepublic boolean containsEntryFor(double maturity,
double termination)
DataTablegetValue on these coordinates as the table may interpolate/extrapolate.containsEntryFor in interface DataTablematurity - Maturity in double as year fraction with respect to reference date.termination - Termination in double as year fraction with respect to reference date.public LocalDate getReferenceDate()
DataTablegetReferenceDate in interface DataTablepublic SchedulePrototype getScheduleMetaData()
getScheduleMetaData in interface DataTableSchedulePrototype used by the table to convert int and double representations.Copyright © 2019. All rights reserved.