Example #1
0
        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);
 }
Example #3
0
		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;
		}
Example #4
0
 public MamdaOptionContractSet()
 {
     mExchangeContracts = new TreeMap();
 }