@Override protected Optional<T> detectOptional(Predicate<? super T> predicate, int start, int end) { for (int i = start; i < end; i++) { Object cur = this.table[i]; if (cur instanceof ChainedBucket) { Object chainedDetect = this.chainedDetect((ChainedBucket) cur, predicate); if (chainedDetect != null) { return Optional.of(this.nonSentinel(chainedDetect)); } } else if (cur != null) { T each = this.nonSentinel(cur); if (predicate.accept(each)) { return Optional.of(each); } } } return Optional.empty(); }
@Override protected Optional<T> detectOptional(Predicate<? super T> predicate, int start, int end) { for (int i = start; i < end; i++) { Object cur = this.table[i]; if (cur instanceof ChainedBucket) { Object chainedDetect = this.chainedDetect((ChainedBucket) cur, predicate); if (chainedDetect != null) { return Optional.of(this.nonSentinel(chainedDetect)); } } else if (cur != null) { T each = this.nonSentinel(cur); if (predicate.accept(each)) { return Optional.of(each); } } } return Optional.empty(); }
@Override protected T detect(Predicate<? super T> predicate, int start, int end) { for (int i = start; i < end; i++) { Object cur = this.table[i]; if (cur instanceof ChainedBucket) { Object chainedDetect = this.chainedDetect((ChainedBucket) cur, predicate); if (chainedDetect != null) { return this.nonSentinel(chainedDetect); } } else if (cur != null) { T each = this.nonSentinel(cur); if (predicate.accept(each)) { return each; } } } return null; }
@Override protected T detect(Predicate<? super T> predicate, int start, int end) { for (int i = start; i < end; i++) { Object cur = this.table[i]; if (cur instanceof ChainedBucket) { Object chainedDetect = this.chainedDetect((ChainedBucket) cur, predicate); if (chainedDetect != null) { return this.nonSentinel(chainedDetect); } } else if (cur != null) { T each = this.nonSentinel(cur); if (predicate.accept(each)) { return each; } } } return null; }
@Override protected Optional<T> detectOptional(Predicate<? super T> predicate, int start, int end) { for (int i = start; i < end; i++) { Object cur = this.table[i]; if (cur instanceof ChainedBucket) { Object chainedDetect = this.chainedDetect((ChainedBucket) cur, predicate); if (chainedDetect != null) { return Optional.of(this.nonSentinel(chainedDetect)); } } else if (cur != null) { T each = this.nonSentinel(cur); if (predicate.accept(each)) { return Optional.of(each); } } } return Optional.empty(); }
@Override protected T detect(Predicate<? super T> predicate, int start, int end) { for (int i = start; i < end; i++) { Object cur = this.table[i]; if (cur instanceof ChainedBucket) { Object chainedDetect = this.chainedDetect((ChainedBucket) cur, predicate); if (chainedDetect != null) { return this.nonSentinel(chainedDetect); } } else if (cur != null) { T each = this.nonSentinel(cur); if (predicate.accept(each)) { return each; } } } return null; }