Is it possible to apply a function to a collection using Java Guava?
问题 I want to apply a function to a collection, map, etc, using Guava. Basically, I need to resize the rows and columns of a Table separately so all rows and columns are of equal size, doing something like this: Table<Integer, Integer, Cell> table = HashBasedTable.create(); Maps.transformValues(table.columnMap(), new ResizeFunction(BlockDimension.WIDTH)); Maps.transformValues(table.rowMap(), new ResizeFunction(BlockDimension.HEIGHT)); public interface Cell { int getSize(BlockDimension dimension);