Code example for Cache

Methods: getIfPresent

0
        } 
        return window;
    } 
 
    public boolean isPresent(final int windowId) {
        return this.xWindows.getIfPresent(Integer.valueOf(windowId)) != null;
    } 
 
    private class DestroyListener { 
        private final XWindow window;
 
        public DestroyListener(final XWindow window) {
            this.window = window;
        } 
 
        @Subscribe 
        public void destroyed(final DestroyNotify destroyNotify) {
            final Integer windowId = (Integer) this.window.getDisplaySurfaceHandle().getNativeHandle();
            XWindowCacheImpl.this.xWindows.invalidate(windowId);
            this.window.unregister(this);
Experience pair programming with AI  Get Codota for Java