• java.lang.Object

• public final class CurveGroupDefinitionCsvLoader
extends Object
Loads a set of curve group definitions into memory by reading from CSV resources.

The CSV file has the following header row:
Group Name, Curve Type, Reference, Curve Name.

• The 'Group Name' column is the name of the group of curves.
• The 'Curve Type' column is the type of the curve, "forward" or "discount".
• The 'Reference' column is the reference the curve is used for, such as "USD" or "USD-LIBOR-3M".
• The 'Curve Name' column is the name of the curve.

CSV files sometimes contain a Unicode Byte Order Mark. Callers are responsible for handling this, such as by using UnicodeBom.

CurveGroupDefinition
• ### Method Summary

All Methods
Modifier and Type Method and Description
static List<CurveGroupDefinition> loadCurveGroupDefinitions(ResourceLocator groupsResource)
Loads the curve groups definition CSV file.
static List<CurveGroupDefinition> loadCurveGroups(ResourceLocator groupsResource)
static List<CurveGroupDefinition> parseCurveGroupDefinitions(com.google.common.io.CharSource groupsCharSource)
Parses the curve groups definition CSV file.
static void writeCurveGroup(Appendable underlying, CurveGroup... groups)
Writes the curve group in a CSV format to an appendable.
static void writeCurveGroup(File file, CurveGroup... groups)
Writes the curve group in a CSV format to a file.
static void writeCurveGroupDefinition(Appendable underlying, CurveGroupDefinition... groups)
Writes the curve groups definition in a CSV format to an appendable.
static void writeCurveGroupDefinition(File file, CurveGroupDefinition... groups)
Writes the curve groups definition in a CSV format to a file.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Method Detail

@Deprecated
public static List<CurveGroupDefinition> loadCurveGroups(ResourceLocator groupsResource)
Loads the curve groups definition CSV file.

The list of NodalCurveDefinition will be empty in the resulting definition.

Parameters:
groupsResource - the curve groups CSV resource
Returns:
the list of definitions

public static List<CurveGroupDefinition> loadCurveGroupDefinitions(ResourceLocator groupsResource)
Loads the curve groups definition CSV file.

The list of NodalCurveDefinition will be empty in the resulting definition.

Parameters:
groupsResource - the curve groups CSV resource
Returns:
the list of definitions
• #### parseCurveGroupDefinitions

public static List<CurveGroupDefinition> parseCurveGroupDefinitions(com.google.common.io.CharSource groupsCharSource)
Parses the curve groups definition CSV file.

The list of NodalCurveDefinition will be empty in the resulting definition.

Parameters:
groupsCharSource - the curve groups CSV character source
Returns:
the list of definitions
• #### writeCurveGroupDefinition

public static void writeCurveGroupDefinition(File file,
CurveGroupDefinition... groups)
Writes the curve groups definition in a CSV format to a file.
Parameters:
file - the destination for the CSV, such as a file
groups - the curve groups
• #### writeCurveGroupDefinition

public static void writeCurveGroupDefinition(Appendable underlying,
CurveGroupDefinition... groups)
Writes the curve groups definition in a CSV format to an appendable.
Parameters:
underlying - the underlying appendable destination
groups - the curve groups
• #### writeCurveGroup

public static void writeCurveGroup(File file,
CurveGroup... groups)
Writes the curve group in a CSV format to a file.
Parameters:
file - the file
groups - the curve groups
• #### writeCurveGroup

public static void writeCurveGroup(Appendable underlying,
CurveGroup... groups)
Writes the curve group in a CSV format to an appendable.
Parameters:
underlying - the underlying appendable destination
groups - the curve groups