@Test public void testClone() { stack.push(key1, key2, key3); KTypeStack<KType> cloned = stack.clone(); cloned.removeAll(key1); assertSortedListEquals(stack.toArray(), key1, key2, key3); assertSortedListEquals(cloned.toArray(), key2, key3); }
@Override public KTypeStack<KType> clone() { return (KTypeStack<KType>) super.clone(); }
KTypeStack extends KTypeArrayList<KType> { @Override public KTypeStack<KType> clone() { return (KTypeStack<KType>) super.clone(); } }
KTypeStack extends KTypeArrayList<KType> { @Override public KTypeStack<KType> clone() { return (KTypeStack<KType>) super.clone(); } KTypeStack();  KTypeStack(int expectedElements);  KTypeStack(int expectedElements, ArraySizingStrategy resizer);  KTypeStack(KTypeContainer<KType> container); }
KTypeStack extends KTypeArrayList<KType> { @Override public KTypeStack<KType> clone() { return (KTypeStack<KType>) super.clone(); } KTypeStack();  KTypeStack(int expectedElements);  KTypeStack(int expectedElements, ArraySizingStrategy resizer);  KTypeStack(KTypeContainer<KType> container); void push(KType e1); void push(KType e1, KType e2); void push(KType e1, KType e2, KType e3); void push(KType e1, KType e2, KType e3, KType e4); void push(KType[] elements, int start, int len); @SafeVarargs /* #end */ final void push(KType... elements); int pushAll(KTypeContainer<? extends KType> container); int pushAll(Iterable<? extends KTypeCursor<? extends KType>> iterable); void discard(int count); void discard(); KType pop(); KType peek(); @SafeVarargs /* #end */ static KTypeStack<KType> from(KType... elements); @Override KTypeStack<KType> clone(); }
KTypeStack extends KTypeArrayList<KType> { @Override public KTypeStack<KType> clone() { return (KTypeStack<KType>) super.clone(); } KTypeStack();  KTypeStack(int expectedElements);  KTypeStack(int expectedElements, ArraySizingStrategy resizer);  KTypeStack(KTypeContainer<KType> container); void push(KType e1); void push(KType e1, KType e2); void push(KType e1, KType e2, KType e3); void push(KType e1, KType e2, KType e3, KType e4); void push(KType[] elements, int start, int len); @SafeVarargs /* #end */ final void push(KType... elements); int pushAll(KTypeContainer<? extends KType> container); int pushAll(Iterable<? extends KTypeCursor<? extends KType>> iterable); void discard(int count); void discard(); KType pop(); KType peek(); @SafeVarargs /* #end */ static KTypeStack<KType> from(KType... elements); @Override KTypeStack<KType> clone();  }