lock.unlockRead(stamp);
}
}
public E get(int index) {
final StampedLock lock = this.lock;
long stamp = lock.tryOptimisticRead();
Object[] items;
if (index >= 0 && (items = array) != null &&
index < count && index < items.length) {
@SuppressWarnings("unchecked") E e = (E)items[index];
if (lock.validate(stamp))
return e;
}
return lockedGet(index);
}