Harvzey

Buffer map

Dec 7th, 2019
134
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