/** * INTERNAL: * Check whether the contents have been read from the database. * If they have not, read them and set the delegate. */ protected Set getDelegate() { if (delegate == null) { synchronized(this){ if (delegate == null) { delegate = this.buildDelegate(); } } } return delegate; }
/** * INTERNAL: * Check whether the contents have been read from the database. * If they have not, read them and set the delegate. */ protected Set<E> getDelegate() { if (delegate == null) { synchronized(this){ if (delegate == null) { delegate = this.buildDelegate(); } } } return delegate; }
/** * INTERNAL: * Check whether the contents have been read from the database. * If they have not, read them and set the delegate. */ protected Set<E> getDelegate() { Set<E> newDelegate = this.delegate; if (newDelegate == null) { synchronized(this){ newDelegate = this.delegate; if (newDelegate == null) { this.delegate = newDelegate = this.buildDelegate(); } } } return newDelegate; }