public object Clone() { // the cast to Map is necessary, otherwise TreeMap will just // get backed by the original map, instead of copying it TreeMap copy = new TreeMap((Map)mBackingStore); return(copy); }
/// <summary> /// Trim the current set of strike prices to the given set. /// </summary> /// <param name="strikeSet"></param> public void trimStrikes(SortedSet strikeSet) { double lowStrike = (double)strikeSet.first(); double highStrike = (double)strikeSet.last(); highStrike = highStrike + 0.0001; TreeMap trimmedStrikes = new TreeMap(subMap(lowStrike, highStrike)); clear(); putAll(trimmedStrikes); }
public object Clone() { // the cast to Map is necessary, otherwise TreeMap will just // get backed by the original map, instead of copying it TreeMap copy = new TreeMap((Map)mBackingStore); return copy; }
public MamdaOptionContractSet() { mExchangeContracts = new TreeMap(); }