BucketedGreekResultCollection implements Iterable<Pair<Greek, double[][]>> { @Override public Iterator<Pair<Greek, double[][]>> iterator() { return new BackingMapGreekIterator(_dataMap.entrySet().iterator()); } BucketedGreekResultCollection(final double[] expiries, final double[][] strikes); double[][] getBucketedGreeks(final Greek greek); void put(final Greek greek, final double[][] result); boolean isEmpty(); boolean contains(final Greek greek); int size(); Set<Greek> keySet(); Collection<double[][]> values(); double[][] getStrikes(); double[] getExpiries(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override Iterator<Pair<Greek, double[][]>> iterator(); static final Greek BUCKETED_VEGA; }
@Test(expectedExceptions = UnsupportedOperationException.class) public void testRemove() { final BucketedGreekResultCollection results = new BucketedGreekResultCollection(EXPIRIES, STRIKES); final Iterator<Pair<Greek, double[][]>> iter = results.iterator(); iter.remove(); }