mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SmartList implements RandomAccess
This commit is contained in:
@@ -27,7 +27,7 @@ import java.util.*;
|
||||
* in which cases it would not allocate array at all.
|
||||
*/
|
||||
@SuppressWarnings({"unchecked"})
|
||||
public class SmartList<E> extends AbstractList<E> {
|
||||
public class SmartList<E> extends AbstractList<E> implements RandomAccess {
|
||||
private int mySize = 0;
|
||||
private Object myElem = null; // null if mySize==0, (E)elem if mySize==1, Object[] if mySize>=2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user