Buffer map

Harvzey Dec 7th, 2019 (edited) 118 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private static final Map<Object, Function<Integer, ? extends Buffer>> BUFFER_MAP;
  2. static {
  3.     BUFFER_MAP = new HashMap<>();
  4.     BUFFER_MAP.put(int[].class, BufferUtils::createIntBuffer);
  5.     BUFFER_MAP.put(float[].class, BufferUtils::createFloatBuffer);
  6. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand