Home | History | Annotate | Download | only in collect

Lines Matching defs:function

24 import com.google.common.base.Function;
239 private static final Function<Cell<?, ?, ?>, Cell<?, ?, ?>> TRANSPOSE_CELL =
240 new Function<Cell<?, ?, ?>, Cell<?, ?, ?>>() {
251 return Iterators.transform(original.cellSet().iterator(), (Function) TRANSPOSE_CELL);
306 * Returns a view of a table where each value is transformed by a function.
315 * null values provided that the function is capable of accepting null input.
316 * The transformed table might contain null values, if the function sometimes
322 * <p>The function is applied lazily, invoked when needed. This is necessary
323 * for the returned table to be a view, but it means that the function will be
325 * {@code Table.toString()}. For this to perform well, {@code function} should
333 Table<R, C, V1> fromTable, Function<? super V1, V2> function) {
334 return new TransformedTable<R, C, V1, V2>(fromTable, function);
340 final Function<? super V1, V2> function;
343 Table<R, C, V1> fromTable, Function<? super V1, V2> function) {
345 this.function = checkNotNull(function);
353 // The function is passed a null input only when the table contains a null
356 ? function.apply(fromTable.get(rowKey, columnKey)) : null;
378 ? function.apply(fromTable.remove(rowKey, columnKey)) : null;
382 return Maps.transformValues(fromTable.row(rowKey), function);
386 return Maps.transformValues(fromTable.column(columnKey), function);
389 Function<Cell<R, C, V1>, Cell<R, C, V2>> cellFunction() {
390 return new Function<Cell<R, C, V1>, Cell<R, C, V2>>() {
394 function.apply(cell.getValue()));
414 return Collections2.transform(fromTable.values(), function);
418 Function<Map<C, V1>, Map<C, V2>> rowFunction =
419 new Function<Map<C, V1>, Map<C, V2>>() {
421 return Maps.transformValues(row, function);
428 Function<Map<R, V1>, Map<R, V2>> columnFunction =
429 new Function<Map<R, V1>, Map<R, V2>>() {
431 return Maps.transformValues(column, function);
494 Function<Map<R, V>, Map<R, V>> wrapper = unmodifiableWrapper();
525 Function<Map<C, V>, Map<C, V>> wrapper = unmodifiableWrapper();
574 Function<Map<C, V>, Map<C, V>> wrapper = unmodifiableWrapper();
587 private static <K, V> Function<Map<K, V>, Map<K, V>> unmodifiableWrapper() {
588 return (Function) UNMODIFIABLE_WRAPPER;
591 private static final Function<? extends Map<?, ?>, ? extends Map<?, ?>> UNMODIFIABLE_WRAPPER =
592 new Function<Map<Object, Object>, Map<Object, Object>>() {