Changing access modifier to allow extension.
@@ -592,7 +592,7 @@ public class SwaptionDataLattice implements Serializable {
* @param key
* @return The value as stored in the lattice.
*/
- private double getValue(DataKey key) {
+ protected double getValue(DataKey key) {
return entryMap.get(key);
}
@@ -768,6 +768,11 @@ public class SwaptionDataLattice implements Serializable {
return fixMetaSchedule;
}
+
+ protected Map<DataKey, Double> getEntryMap() {
+ return entryMap;
+ }
+
@Override
public String toString() {
StringBuilder builder = new StringBuilder(super.toString());
@@ -791,7 +796,7 @@ public class SwaptionDataLattice implements Serializable {
* @author Roland Bachl
*
*/
- private class DataKey implements Serializable {
+ protected class DataKey implements Serializable {
private static final long serialVersionUID = -8284316295640713492L;
@@ -841,5 +846,13 @@ public class SwaptionDataLattice implements Serializable {
public int hashCode() {
return maturity + 100* tenor + 10000* moneyness;
}
+
+ public DataKey getCloneWithModifiedMoneyness(double moneyness) {
+ return new DataKey(maturity, tenor, moneyness);
+ }
+
+ public int getMoneyness() {
+ return moneyness;
+ }
}
}
