All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.util.Casting Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
package org.infinispan.util;

import org.infinispan.util.function.SerializableSupplier;

import java.util.function.Supplier;
import java.util.stream.Collector;

public class Casting {

   // The hacks here allow casts to work properly,
   // since Java doesn't work as well with nested generics

   @SuppressWarnings("unchecked")
   public static  SerializableSupplier> toSerialSupplierCollect(
      SerializableSupplier supplier) {
      return supplier;
   }

   // This is a hack to allow for cast to work properly, since Java doesn't work as well with nested generics
   @SuppressWarnings("unchecked")
   public static  Supplier> toSupplierCollect(Supplier supplier) {
      return supplier;
   }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy