/** * Creates a new array list and fills it with a given type-specific list. * * @param l a type-specific list that will be used to fill the array list. */ public IdentityArrayList(final ObjectList<? extends K> l) { this(l.size()); l.getElements(0, a, 0, size = l.size()); }
@Override public void getElements(final int from, final Object a[], final int offset, final int length) { synchronized (sync) { list.getElements(from, a, offset, length); } } @Override
@Override public void getElements(final int from, final Object a[], final int offset, final int length) { list.getElements(from, a, offset, length); } @Override
/** * Creates a new array list and fills it with a given type-specific list. * * @param l * a type-specific list that will be used to fill the array list. */ public ObjectArrayList(final ObjectList<? extends K> l) { this(l.size()); l.getElements(0, a, 0, size = l.size()); } /**
/** Creates a new array list and fills it with a given type-specific list. * * @param l a type-specific list that will be used to fill the array list. */ public IdentityArrayList ( final ObjectList <? extends K> l ) { this( l.size() ); l.getElements( 0, a, 0, size = l.size() ); } /** Creates a new array list and fills it with the elements of a given array.
@Override public void getElements(final int from, final Object[] a, final int offset, final int length) { ensureIndex(from); if (from + length > size()) throw new IndexOutOfBoundsException( "End index (" + from + length + ") is greater than list size (" + size() + ")"); l.getElements(this.from + from, a, offset, length); } @Override