@Test public void getEmpty() { assertEquals(Optional.empty(), l.get()); }
@SuppressWarnings("unchecked") public final Optional<T> get() { final Optional<?>[] ctx = threadLocal.get(); if (ctx == null || ctx.length <= position) return Optional.empty(); final Optional<?> v = ctx[position]; if (v == null) return Optional.empty(); else return (Optional<T>) v; }
Local { @SuppressWarnings("unchecked") public final Optional<T> get() { final Optional<?>[] ctx = threadLocal.get(); if (ctx == null || ctx.length <= position) return Optional.empty(); final Optional<?> v = ctx[position]; if (v == null) return Optional.empty(); else return (Optional<T>) v; } }
Local { @SuppressWarnings("unchecked") public final Optional<T> get() { final Optional<?>[] ctx = threadLocal.get(); if (ctx == null || ctx.length <= position) return Optional.empty(); final Optional<?> v = ctx[position]; if (v == null) return Optional.empty(); else return (Optional<T>) v; } private  Local(); }
Local { @SuppressWarnings("unchecked") public final Optional<T> get() { final Optional<?>[] ctx = threadLocal.get(); if (ctx == null || ctx.length <= position) return Optional.empty(); final Optional<?> v = ctx[position]; if (v == null) return Optional.empty(); else return (Optional<T>) v; } private  Local(); static final Local<T> apply(); final void update(final T value); final void set(final Optional<T> opt); @SuppressWarnings("unchecked") final Optional<T> get(); final U let(final T value, final Supplier<U> s); }
Local { @SuppressWarnings("unchecked") public final Optional<T> get() { final Optional<?>[] ctx = threadLocal.get(); if (ctx == null || ctx.length <= position) return Optional.empty(); final Optional<?> v = ctx[position]; if (v == null) return Optional.empty(); else return (Optional<T>) v; } private  Local(); static final Local<T> apply(); final void update(final T value); final void set(final Optional<T> opt); @SuppressWarnings("unchecked") final Optional<T> get(); final U let(final T value, final Supplier<U> s);  }