17.46/5.64 YES 17.53/5.65 proof of /export/starexec/sandbox2/benchmark/theBenchmark.jar 17.53/5.65 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 17.53/5.65 17.53/5.65 17.53/5.65 termination of the given Bare JBC problem could be proven: 17.53/5.65 17.53/5.65 (0) Bare JBC problem 17.53/5.65 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 17.53/5.65 (2) JBC problem 17.53/5.65 (3) JBCToGraph [EQUIVALENT, 2621 ms] 17.53/5.65 (4) JBCTerminationGraph 17.53/5.65 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 17.53/5.65 (6) JBCTerminationSCC 17.53/5.65 (7) SCCToIRSProof [SOUND, 411 ms] 17.53/5.65 (8) IRSwT 17.53/5.65 (9) IRSFormatTransformerProof [EQUIVALENT, 0 ms] 17.53/5.65 (10) IRSwT 17.53/5.65 (11) IRSwTTerminationDigraphProof [EQUIVALENT, 100 ms] 17.53/5.65 (12) IRSwT 17.53/5.65 (13) IntTRSCompressionProof [EQUIVALENT, 0 ms] 17.53/5.65 (14) IRSwT 17.53/5.65 (15) TempFilterProof [SOUND, 114 ms] 17.53/5.65 (16) IntTRS 17.53/5.65 (17) PolynomialOrderProcessor [EQUIVALENT, 0 ms] 17.53/5.65 (18) IntTRS 17.53/5.65 (19) PolynomialOrderProcessor [EQUIVALENT, 0 ms] 17.53/5.65 (20) YES 17.53/5.65 17.53/5.65 17.53/5.65 ---------------------------------------- 17.53/5.65 17.53/5.65 (0) 17.53/5.65 Obligation: 17.53/5.65 need to prove termination of the following program: 17.53/5.65 /* 17.53/5.65 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.65 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.65 * 17.53/5.65 * This code is free software; you can redistribute it and/or modify it 17.53/5.65 * under the terms of the GNU General Public License version 2 only, as 17.53/5.65 * published by the Free Software Foundation. Sun designates this 17.53/5.65 * particular file as subject to the "Classpath" exception as provided 17.53/5.65 * by Sun in the LICENSE file that accompanied this code. 17.53/5.65 * 17.53/5.65 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.65 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.65 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.65 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.65 * accompanied this code). 17.53/5.65 * 17.53/5.65 * You should have received a copy of the GNU General Public License version 17.53/5.65 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.65 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.65 * 17.53/5.65 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.65 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.65 * have any questions. 17.53/5.65 */ 17.53/5.65 17.53/5.65 package javaUtilEx; 17.53/5.65 17.53/5.65 /** 17.53/5.65 * This class provides a skeletal implementation of the Collection 17.53/5.65 * interface, to minimize the effort required to implement this interface.

17.53/5.65 * 17.53/5.65 * To implement an unmodifiable collection, the programmer needs only to 17.53/5.65 * extend this class and provide implementations for the iterator and 17.53/5.65 * size methods. (The iterator returned by the iterator 17.53/5.65 * method must implement hasNext and next.)

17.53/5.65 * 17.53/5.65 * To implement a modifiable collection, the programmer must additionally 17.53/5.65 * override this class's add method (which otherwise throws an 17.53/5.65 * UnsupportedOperationException), and the iterator returned by the 17.53/5.65 * iterator method must additionally implement its remove 17.53/5.65 * method.

17.53/5.65 * 17.53/5.65 * The programmer should generally provide a void (no argument) and 17.53/5.65 * Collection constructor, as per the recommendation in the 17.53/5.65 * Collection interface specification.

17.53/5.65 * 17.53/5.65 * The documentation for each non-abstract method in this class describes its 17.53/5.65 * implementation in detail. Each of these methods may be overridden if 17.53/5.65 * the collection being implemented admits a more efficient implementation.

17.53/5.65 * 17.53/5.65 * This class is a member of the 17.53/5.65 * 17.53/5.65 * Java Collections Framework. 17.53/5.65 * 17.53/5.65 * @author Josh Bloch 17.53/5.65 * @author Neal Gafter 17.53/5.65 * @see Collection 17.53/5.65 * @since 1.2 17.53/5.65 */ 17.53/5.65 17.53/5.65 public abstract class AbstractCollection implements Collection { 17.53/5.65 /** 17.53/5.65 * Sole constructor. (For invocation by subclass constructors, typically 17.53/5.65 * implicit.) 17.53/5.65 */ 17.53/5.65 protected AbstractCollection() { 17.53/5.65 } 17.53/5.65 17.53/5.65 // Query Operations 17.53/5.65 17.53/5.65 /** 17.53/5.65 * Returns an iterator over the elements contained in this collection. 17.53/5.65 * 17.53/5.65 * @return an iterator over the elements contained in this collection 17.53/5.65 */ 17.53/5.65 public abstract Iterator iterator(); 17.53/5.65 17.53/5.65 public abstract int size(); 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation returns size() == 0. 17.53/5.65 */ 17.53/5.65 public boolean isEmpty() { 17.53/5.65 return size() == 0; 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation iterates over the elements in the collection, 17.53/5.65 * checking each element in turn for equality with the specified element. 17.53/5.65 * 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 */ 17.53/5.65 public boolean contains(Object o) { 17.53/5.65 Iterator e = iterator(); 17.53/5.65 if (o==null) { 17.53/5.65 while (e.hasNext()) 17.53/5.65 if (e.next()==null) 17.53/5.65 return true; 17.53/5.65 } else { 17.53/5.65 while (e.hasNext()) 17.53/5.65 if (o.equals(e.next())) 17.53/5.65 return true; 17.53/5.65 } 17.53/5.65 return false; 17.53/5.65 } 17.53/5.65 17.53/5.65 // Modification Operations 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation always throws an 17.53/5.65 * UnsupportedOperationException. 17.53/5.65 * 17.53/5.65 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.65 * @throws IllegalStateException {@inheritDoc} 17.53/5.65 */ 17.53/5.65 public boolean add(E e) { 17.53/5.65 throw new UnsupportedOperationException(); 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation iterates over the collection looking for the 17.53/5.65 * specified element. If it finds the element, it removes the element 17.53/5.65 * from the collection using the iterator's remove method. 17.53/5.65 * 17.53/5.65 *

Note that this implementation throws an 17.53/5.65 * UnsupportedOperationException if the iterator returned by this 17.53/5.65 * collection's iterator method does not implement the remove 17.53/5.65 * method and this collection contains the specified object. 17.53/5.65 * 17.53/5.65 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 */ 17.53/5.65 public boolean remove(Object o) { 17.53/5.65 Iterator e = iterator(); 17.53/5.65 if (o==null) { 17.53/5.65 while (e.hasNext()) { 17.53/5.65 if (e.next()==null) { 17.53/5.65 e.remove(); 17.53/5.65 return true; 17.53/5.65 } 17.53/5.65 } 17.53/5.65 } else { 17.53/5.65 while (e.hasNext()) { 17.53/5.65 if (o.equals(e.next())) { 17.53/5.65 e.remove(); 17.53/5.65 return true; 17.53/5.65 } 17.53/5.65 } 17.53/5.65 } 17.53/5.65 return false; 17.53/5.65 } 17.53/5.65 17.53/5.65 17.53/5.65 // Bulk Operations 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation iterates over the specified collection, 17.53/5.65 * checking each element returned by the iterator in turn to see 17.53/5.65 * if it's contained in this collection. If all elements are so 17.53/5.65 * contained true is returned, otherwise false. 17.53/5.65 * 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 * @see #contains(Object) 17.53/5.65 */ 17.53/5.65 public boolean containsAll(Collection c) { 17.53/5.65 Iterator e = c.iterator(); 17.53/5.65 while (e.hasNext()) 17.53/5.65 if (!contains(e.next())) 17.53/5.65 return false; 17.53/5.65 return true; 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation iterates over the specified collection, and adds 17.53/5.65 * each object returned by the iterator to this collection, in turn. 17.53/5.65 * 17.53/5.65 *

Note that this implementation will throw an 17.53/5.65 * UnsupportedOperationException unless add is 17.53/5.65 * overridden (assuming the specified collection is non-empty). 17.53/5.65 * 17.53/5.65 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.65 * @throws IllegalStateException {@inheritDoc} 17.53/5.65 * 17.53/5.65 * @see #add(Object) 17.53/5.65 */ 17.53/5.65 public boolean addAll(Collection c) { 17.53/5.65 boolean modified = false; 17.53/5.65 Iterator e = c.iterator(); 17.53/5.65 while (e.hasNext()) { 17.53/5.65 if (add(e.next())) 17.53/5.65 modified = true; 17.53/5.65 } 17.53/5.65 return modified; 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation iterates over this collection, checking each 17.53/5.65 * element returned by the iterator in turn to see if it's contained 17.53/5.65 * in the specified collection. If it's so contained, it's removed from 17.53/5.65 * this collection with the iterator's remove method. 17.53/5.65 * 17.53/5.65 *

Note that this implementation will throw an 17.53/5.65 * UnsupportedOperationException if the iterator returned by the 17.53/5.65 * iterator method does not implement the remove method 17.53/5.65 * and this collection contains one or more elements in common with the 17.53/5.65 * specified collection. 17.53/5.65 * 17.53/5.65 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 * 17.53/5.65 * @see #remove(Object) 17.53/5.65 * @see #contains(Object) 17.53/5.65 */ 17.53/5.65 public boolean removeAll(Collection c) { 17.53/5.65 boolean modified = false; 17.53/5.65 Iterator e = iterator(); 17.53/5.65 while (e.hasNext()) { 17.53/5.65 if (c.contains(e.next())) { 17.53/5.65 e.remove(); 17.53/5.65 modified = true; 17.53/5.65 } 17.53/5.65 } 17.53/5.65 return modified; 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation iterates over this collection, checking each 17.53/5.65 * element returned by the iterator in turn to see if it's contained 17.53/5.65 * in the specified collection. If it's not so contained, it's removed 17.53/5.65 * from this collection with the iterator's remove method. 17.53/5.65 * 17.53/5.65 *

Note that this implementation will throw an 17.53/5.65 * UnsupportedOperationException if the iterator returned by the 17.53/5.65 * iterator method does not implement the remove method 17.53/5.65 * and this collection contains one or more elements not present in the 17.53/5.65 * specified collection. 17.53/5.65 * 17.53/5.65 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 * 17.53/5.65 * @see #remove(Object) 17.53/5.65 * @see #contains(Object) 17.53/5.65 */ 17.53/5.65 public boolean retainAll(Collection c) { 17.53/5.65 boolean modified = false; 17.53/5.65 Iterator e = iterator(); 17.53/5.65 while (e.hasNext()) { 17.53/5.65 if (!c.contains(e.next())) { 17.53/5.65 e.remove(); 17.53/5.65 modified = true; 17.53/5.65 } 17.53/5.65 } 17.53/5.65 return modified; 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation iterates over this collection, removing each 17.53/5.65 * element using the Iterator.remove operation. Most 17.53/5.65 * implementations will probably choose to override this method for 17.53/5.65 * efficiency. 17.53/5.65 * 17.53/5.65 *

Note that this implementation will throw an 17.53/5.65 * UnsupportedOperationException if the iterator returned by this 17.53/5.65 * collection's iterator method does not implement the 17.53/5.65 * remove method and this collection is non-empty. 17.53/5.65 * 17.53/5.65 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.65 */ 17.53/5.65 public void clear() { 17.53/5.65 Iterator e = iterator(); 17.53/5.65 while (e.hasNext()) { 17.53/5.65 e.next(); 17.53/5.65 e.remove(); 17.53/5.65 } 17.53/5.65 } 17.53/5.65 17.53/5.65 17.53/5.65 // String conversion 17.53/5.65 17.53/5.65 /** 17.53/5.65 * Returns a string representation of this collection. The string 17.53/5.65 * representation consists of a list of the collection's elements in the 17.53/5.65 * order they are returned by its iterator, enclosed in square brackets 17.53/5.65 * ("[]"). Adjacent elements are separated by the characters 17.53/5.65 * ", " (comma and space). Elements are converted to strings as 17.53/5.65 * by {@link String#valueOf(Object)}. 17.53/5.65 * 17.53/5.65 * @return a string representation of this collection 17.53/5.65 */ 17.53/5.65 public String toString() { 17.53/5.65 Iterator i = iterator(); 17.53/5.65 if (! i.hasNext()) 17.53/5.65 return "[]"; 17.53/5.65 17.53/5.65 String sb = ""; 17.53/5.65 sb = sb + "["; 17.53/5.65 for (;;) { 17.53/5.65 E e = i.next(); 17.53/5.65 sb = sb + (e == this ? "(this Collection)" : e); 17.53/5.65 if (! i.hasNext()) { 17.53/5.65 sb = sb + "]"; 17.53/5.65 return sb; 17.53/5.65 } 17.53/5.65 sb = sb + ", "; 17.53/5.65 } 17.53/5.65 } 17.53/5.65 17.53/5.65 } 17.53/5.65 17.53/5.65 17.53/5.65 /* 17.53/5.65 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.65 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.65 * 17.53/5.65 * This code is free software; you can redistribute it and/or modify it 17.53/5.65 * under the terms of the GNU General Public License version 2 only, as 17.53/5.65 * published by the Free Software Foundation. Sun designates this 17.53/5.65 * particular file as subject to the "Classpath" exception as provided 17.53/5.65 * by Sun in the LICENSE file that accompanied this code. 17.53/5.65 * 17.53/5.65 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.65 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.65 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.65 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.65 * accompanied this code). 17.53/5.65 * 17.53/5.65 * You should have received a copy of the GNU General Public License version 17.53/5.65 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.65 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.65 * 17.53/5.65 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.65 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.65 * have any questions. 17.53/5.65 */ 17.53/5.65 17.53/5.65 package javaUtilEx; 17.53/5.65 17.53/5.65 /** 17.53/5.65 * This class provides a skeletal implementation of the {@link List} 17.53/5.65 * interface to minimize the effort required to implement this interface 17.53/5.65 * backed by a "random access" data store (such as an array). For sequential 17.53/5.65 * access data (such as a linked list), {@link AbstractSequentialList} should 17.53/5.65 * be used in preference to this class. 17.53/5.65 * 17.53/5.65 *

To implement an unmodifiable list, the programmer needs only to extend 17.53/5.65 * this class and provide implementations for the {@link #get(int)} and 17.53/5.65 * {@link List#size() size()} methods. 17.53/5.65 * 17.53/5.65 *

To implement a modifiable list, the programmer must additionally 17.53/5.65 * override the {@link #set(int, Object) set(int, E)} method (which otherwise 17.53/5.65 * throws an {@code UnsupportedOperationException}). If the list is 17.53/5.65 * variable-size the programmer must additionally override the 17.53/5.65 * {@link #add(int, Object) add(int, E)} and {@link #remove(int)} methods. 17.53/5.65 * 17.53/5.65 *

The programmer should generally provide a void (no argument) and collection 17.53/5.65 * constructor, as per the recommendation in the {@link Collection} interface 17.53/5.65 * specification. 17.53/5.65 * 17.53/5.65 *

Unlike the other abstract collection implementations, the programmer does 17.53/5.65 * not have to provide an iterator implementation; the iterator and 17.53/5.65 * list iterator are implemented by this class, on top of the "random access" 17.53/5.65 * methods: 17.53/5.65 * {@link #get(int)}, 17.53/5.65 * {@link #set(int, Object) set(int, E)}, 17.53/5.65 * {@link #add(int, Object) add(int, E)} and 17.53/5.65 * {@link #remove(int)}. 17.53/5.65 * 17.53/5.65 *

The documentation for each non-abstract method in this class describes its 17.53/5.65 * implementation in detail. Each of these methods may be overridden if the 17.53/5.65 * collection being implemented admits a more efficient implementation. 17.53/5.65 * 17.53/5.65 *

This class is a member of the 17.53/5.65 * 17.53/5.65 * Java Collections Framework. 17.53/5.65 * 17.53/5.65 * @author Josh Bloch 17.53/5.65 * @author Neal Gafter 17.53/5.65 * @since 1.2 17.53/5.65 */ 17.53/5.65 17.53/5.65 public abstract class AbstractList extends AbstractCollection implements List { 17.53/5.65 /** 17.53/5.65 * Sole constructor. (For invocation by subclass constructors, typically 17.53/5.65 * implicit.) 17.53/5.65 */ 17.53/5.65 protected AbstractList() { 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * Appends the specified element to the end of this list (optional 17.53/5.65 * operation). 17.53/5.65 * 17.53/5.65 *

Lists that support this operation may place limitations on what 17.53/5.65 * elements may be added to this list. In particular, some 17.53/5.65 * lists will refuse to add null elements, and others will impose 17.53/5.65 * restrictions on the type of elements that may be added. List 17.53/5.65 * classes should clearly specify in their documentation any restrictions 17.53/5.65 * on what elements may be added. 17.53/5.65 * 17.53/5.65 *

This implementation calls {@code add(size(), e)}. 17.53/5.65 * 17.53/5.65 *

Note that this implementation throws an 17.53/5.65 * {@code UnsupportedOperationException} unless 17.53/5.65 * {@link #add(int, Object) add(int, E)} is overridden. 17.53/5.65 * 17.53/5.65 * @param e element to be appended to this list 17.53/5.65 * @return {@code true} (as specified by {@link Collection#add}) 17.53/5.65 * @throws UnsupportedOperationException if the {@code add} operation 17.53/5.65 * is not supported by this list 17.53/5.65 * @throws ClassCastException if the class of the specified element 17.53/5.65 * prevents it from being added to this list 17.53/5.65 * @throws NullPointerException if the specified element is null and this 17.53/5.65 * list does not permit null elements 17.53/5.65 * @throws IllegalArgumentException if some property of this element 17.53/5.65 * prevents it from being added to this list 17.53/5.65 */ 17.53/5.65 public boolean add(E e) { 17.53/5.65 add(size(), e); 17.53/5.65 return true; 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.65 */ 17.53/5.65 abstract public E get(int index); 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation always throws an 17.53/5.65 * {@code UnsupportedOperationException}. 17.53/5.65 * 17.53/5.65 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.65 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.65 */ 17.53/5.65 public E set(int index, E element) { 17.53/5.65 throw new UnsupportedOperationException(); 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation always throws an 17.53/5.65 * {@code UnsupportedOperationException}. 17.53/5.65 * 17.53/5.65 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.65 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.65 */ 17.53/5.65 public void add(int index, E element) { 17.53/5.65 throw new UnsupportedOperationException(); 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation always throws an 17.53/5.65 * {@code UnsupportedOperationException}. 17.53/5.65 * 17.53/5.65 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.65 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.65 */ 17.53/5.65 public E remove(int index) { 17.53/5.65 throw new UnsupportedOperationException(); 17.53/5.65 } 17.53/5.65 17.53/5.65 17.53/5.65 // Search Operations 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation first gets a list iterator (with 17.53/5.65 * {@code listIterator()}). Then, it iterates over the list until the 17.53/5.65 * specified element is found or the end of the list is reached. 17.53/5.65 * 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 */ 17.53/5.65 public int indexOf(Object o) { 17.53/5.65 ListIterator e = listIterator(); 17.53/5.65 if (o==null) { 17.53/5.65 while (e.hasNext()) 17.53/5.65 if (e.next()==null) 17.53/5.65 return e.previousIndex(); 17.53/5.65 } else { 17.53/5.65 while (e.hasNext()) 17.53/5.65 if (o.equals(e.next())) 17.53/5.65 return e.previousIndex(); 17.53/5.65 } 17.53/5.65 return -1; 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation first gets a list iterator that points to the end 17.53/5.65 * of the list (with {@code listIterator(size())}). Then, it iterates 17.53/5.65 * backwards over the list until the specified element is found, or the 17.53/5.65 * beginning of the list is reached. 17.53/5.65 * 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 */ 17.53/5.65 public int lastIndexOf(Object o) { 17.53/5.65 ListIterator e = listIterator(size()); 17.53/5.65 if (o==null) { 17.53/5.65 while (e.hasPrevious()) 17.53/5.65 if (e.previous()==null) 17.53/5.65 return e.nextIndex(); 17.53/5.65 } else { 17.53/5.65 while (e.hasPrevious()) 17.53/5.65 if (o.equals(e.previous())) 17.53/5.65 return e.nextIndex(); 17.53/5.65 } 17.53/5.65 return -1; 17.53/5.65 } 17.53/5.65 17.53/5.65 17.53/5.65 // Bulk Operations 17.53/5.65 17.53/5.65 /** 17.53/5.65 * Removes all of the elements from this list (optional operation). 17.53/5.65 * The list will be empty after this call returns. 17.53/5.65 * 17.53/5.65 *

This implementation calls {@code removeRange(0, size())}. 17.53/5.65 * 17.53/5.65 *

Note that this implementation throws an 17.53/5.65 * {@code UnsupportedOperationException} unless {@code remove(int 17.53/5.65 * index)} or {@code removeRange(int fromIndex, int toIndex)} is 17.53/5.65 * overridden. 17.53/5.65 * 17.53/5.65 * @throws UnsupportedOperationException if the {@code clear} operation 17.53/5.65 * is not supported by this list 17.53/5.65 */ 17.53/5.65 public void clear() { 17.53/5.65 removeRange(0, size()); 17.53/5.65 } 17.53/5.65 17.53/5.65 /** 17.53/5.65 * {@inheritDoc} 17.53/5.65 * 17.53/5.65 *

This implementation gets an iterator over the specified collection 17.53/5.65 * and iterates over it, inserting the elements obtained from the 17.53/5.65 * iterator into this list at the appropriate position, one at a time, 17.53/5.65 * using {@code add(int, E)}. 17.53/5.65 * Many implementations will override this method for efficiency. 17.53/5.65 * 17.53/5.65 *

Note that this implementation throws an 17.53/5.65 * {@code UnsupportedOperationException} unless 17.53/5.65 * {@link #add(int, Object) add(int, E)} is overridden. 17.53/5.65 * 17.53/5.65 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.65 * @throws ClassCastException {@inheritDoc} 17.53/5.65 * @throws NullPointerException {@inheritDoc} 17.53/5.65 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.65 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.65 */ 17.53/5.65 public boolean addAll(int index, Collection c) { 17.53/5.65 rangeCheckForAdd(index); 17.53/5.65 boolean modified = false; 17.53/5.65 Iterator e = c.iterator(); 17.53/5.65 while (e.hasNext()) { 17.53/5.65 add(index++, e.next()); 17.53/5.65 modified = true; 17.53/5.65 } 17.53/5.65 return modified; 17.53/5.65 } 17.53/5.65 17.53/5.65 17.53/5.65 // Iterators 17.53/5.65 17.53/5.65 /** 17.53/5.65 * Returns an iterator over the elements in this list in proper sequence. 17.53/5.65 * 17.53/5.65 *

This implementation returns a straightforward implementation of the 17.53/5.66 * iterator interface, relying on the backing list's {@code size()}, 17.53/5.66 * {@code get(int)}, and {@code remove(int)} methods. 17.53/5.66 * 17.53/5.66 *

Note that the iterator returned by this method will throw an 17.53/5.66 * {@link UnsupportedOperationException} in response to its 17.53/5.66 * {@code remove} method unless the list's {@code remove(int)} method is 17.53/5.66 * overridden. 17.53/5.66 * 17.53/5.66 *

This implementation can be made to throw runtime exceptions in the 17.53/5.66 * face of concurrent modification, as described in the specification 17.53/5.66 * for the (protected) {@link #modCount} field. 17.53/5.66 * 17.53/5.66 * @return an iterator over the elements in this list in proper sequence 17.53/5.66 */ 17.53/5.66 public Iterator iterator() { 17.53/5.66 return new Itr(); 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * {@inheritDoc} 17.53/5.66 * 17.53/5.66 *

This implementation returns {@code listIterator(0)}. 17.53/5.66 * 17.53/5.66 * @see #listIterator(int) 17.53/5.66 */ 17.53/5.66 public ListIterator listIterator() { 17.53/5.66 return listIterator(0); 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * {@inheritDoc} 17.53/5.66 * 17.53/5.66 *

This implementation returns a straightforward implementation of the 17.53/5.66 * {@code ListIterator} interface that extends the implementation of the 17.53/5.66 * {@code Iterator} interface returned by the {@code iterator()} method. 17.53/5.66 * The {@code ListIterator} implementation relies on the backing list's 17.53/5.66 * {@code get(int)}, {@code set(int, E)}, {@code add(int, E)} 17.53/5.66 * and {@code remove(int)} methods. 17.53/5.66 * 17.53/5.66 *

Note that the list iterator returned by this implementation will 17.53/5.66 * throw an {@link UnsupportedOperationException} in response to its 17.53/5.66 * {@code remove}, {@code set} and {@code add} methods unless the 17.53/5.66 * list's {@code remove(int)}, {@code set(int, E)}, and 17.53/5.66 * {@code add(int, E)} methods are overridden. 17.53/5.66 * 17.53/5.66 *

This implementation can be made to throw runtime exceptions in the 17.53/5.66 * face of concurrent modification, as described in the specification for 17.53/5.66 * the (protected) {@link #modCount} field. 17.53/5.66 * 17.53/5.66 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.66 */ 17.53/5.66 public ListIterator listIterator(final int index) { 17.53/5.66 rangeCheckForAdd(index); 17.53/5.66 17.53/5.66 return new ListItr(index); 17.53/5.66 } 17.53/5.66 17.53/5.66 private class Itr implements Iterator { 17.53/5.66 /** 17.53/5.66 * Index of element to be returned by subsequent call to next. 17.53/5.66 */ 17.53/5.66 int cursor = 0; 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Index of element returned by most recent call to next or 17.53/5.66 * previous. Reset to -1 if this element is deleted by a call 17.53/5.66 * to remove. 17.53/5.66 */ 17.53/5.66 int lastRet = -1; 17.53/5.66 17.53/5.66 /** 17.53/5.66 * The modCount value that the iterator believes that the backing 17.53/5.66 * List should have. If this expectation is violated, the iterator 17.53/5.66 * has detected concurrent modification. 17.53/5.66 */ 17.53/5.66 int expectedModCount = modCount; 17.53/5.66 17.53/5.66 public boolean hasNext() { 17.53/5.66 return cursor != size(); 17.53/5.66 } 17.53/5.66 17.53/5.66 public E next() { 17.53/5.66 checkForComodification(); 17.53/5.66 try { 17.53/5.66 int i = cursor; 17.53/5.66 E next = get(i); 17.53/5.66 lastRet = i; 17.53/5.66 cursor = i + 1; 17.53/5.66 return next; 17.53/5.66 } catch (IndexOutOfBoundsException e) { 17.53/5.66 checkForComodification(); 17.53/5.66 throw new NoSuchElementException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 public void remove() { 17.53/5.66 if (lastRet < 0) 17.53/5.66 throw new IllegalStateException(); 17.53/5.66 checkForComodification(); 17.53/5.66 17.53/5.66 try { 17.53/5.66 AbstractList.this.remove(lastRet); 17.53/5.66 if (lastRet < cursor) 17.53/5.66 cursor--; 17.53/5.66 lastRet = -1; 17.53/5.66 expectedModCount = modCount; 17.53/5.66 } catch (IndexOutOfBoundsException e) { 17.53/5.66 throw new ConcurrentModificationException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 final void checkForComodification() { 17.53/5.66 if (modCount != expectedModCount) 17.53/5.66 throw new ConcurrentModificationException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 private class ListItr extends Itr implements ListIterator { 17.53/5.66 ListItr(int index) { 17.53/5.66 cursor = index; 17.53/5.66 } 17.53/5.66 17.53/5.66 public boolean hasPrevious() { 17.53/5.66 return cursor != 0; 17.53/5.66 } 17.53/5.66 17.53/5.66 public E previous() { 17.53/5.66 checkForComodification(); 17.53/5.66 try { 17.53/5.66 int i = cursor - 1; 17.53/5.66 E previous = get(i); 17.53/5.66 lastRet = cursor = i; 17.53/5.66 return previous; 17.53/5.66 } catch (IndexOutOfBoundsException e) { 17.53/5.66 checkForComodification(); 17.53/5.66 throw new NoSuchElementException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 public int nextIndex() { 17.53/5.66 return cursor; 17.53/5.66 } 17.53/5.66 17.53/5.66 public int previousIndex() { 17.53/5.66 return cursor-1; 17.53/5.66 } 17.53/5.66 17.53/5.66 public void set(E e) { 17.53/5.66 if (lastRet < 0) 17.53/5.66 throw new IllegalStateException(); 17.53/5.66 checkForComodification(); 17.53/5.66 17.53/5.66 try { 17.53/5.66 AbstractList.this.set(lastRet, e); 17.53/5.66 expectedModCount = modCount; 17.53/5.66 } catch (IndexOutOfBoundsException ex) { 17.53/5.66 throw new ConcurrentModificationException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 public void add(E e) { 17.53/5.66 checkForComodification(); 17.53/5.66 17.53/5.66 try { 17.53/5.66 int i = cursor; 17.53/5.66 AbstractList.this.add(i, e); 17.53/5.66 lastRet = -1; 17.53/5.66 cursor = i + 1; 17.53/5.66 expectedModCount = modCount; 17.53/5.66 } catch (IndexOutOfBoundsException ex) { 17.53/5.66 throw new ConcurrentModificationException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * {@inheritDoc} 17.53/5.66 * 17.53/5.66 *

This implementation returns a list that subclasses 17.53/5.66 * {@code AbstractList}. The subclass stores, in private fields, the 17.53/5.66 * offset of the subList within the backing list, the size of the subList 17.53/5.66 * (which can change over its lifetime), and the expected 17.53/5.66 * {@code modCount} value of the backing list. There are two variants 17.53/5.66 * of the subclass, one of which implements {@code RandomAccess}. 17.53/5.66 * If this list implements {@code RandomAccess} the returned list will 17.53/5.66 * be an instance of the subclass that implements {@code RandomAccess}. 17.53/5.66 * 17.53/5.66 *

The subclass's {@code set(int, E)}, {@code get(int)}, 17.53/5.66 * {@code add(int, E)}, {@code remove(int)}, {@code addAll(int, 17.53/5.66 * Collection)} and {@code removeRange(int, int)} methods all 17.53/5.66 * delegate to the corresponding methods on the backing abstract list, 17.53/5.66 * after bounds-checking the index and adjusting for the offset. The 17.53/5.66 * {@code addAll(Collection c)} method merely returns {@code addAll(size, 17.53/5.66 * c)}. 17.53/5.66 * 17.53/5.66 *

The {@code listIterator(int)} method returns a "wrapper object" 17.53/5.66 * over a list iterator on the backing list, which is created with the 17.53/5.66 * corresponding method on the backing list. The {@code iterator} method 17.53/5.66 * merely returns {@code listIterator()}, and the {@code size} method 17.53/5.66 * merely returns the subclass's {@code size} field. 17.53/5.66 * 17.53/5.66 *

All methods first check to see if the actual {@code modCount} of 17.53/5.66 * the backing list is equal to its expected value, and throw a 17.53/5.66 * {@code ConcurrentModificationException} if it is not. 17.53/5.66 * 17.53/5.66 * @throws IndexOutOfBoundsException if an endpoint index value is out of range 17.53/5.66 * {@code (fromIndex < 0 || toIndex > size)} 17.53/5.66 * @throws IllegalArgumentException if the endpoint indices are out of order 17.53/5.66 * {@code (fromIndex > toIndex)} 17.53/5.66 */ 17.53/5.66 public List subList(int fromIndex, int toIndex) { 17.53/5.66 return (this instanceof RandomAccess ? 17.53/5.66 new RandomAccessSubList(this, fromIndex, toIndex) : 17.53/5.66 new SubList(this, fromIndex, toIndex)); 17.53/5.66 } 17.53/5.66 17.53/5.66 // Comparison and hashing 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Compares the specified object with this list for equality. Returns 17.53/5.66 * {@code true} if and only if the specified object is also a list, both 17.53/5.66 * lists have the same size, and all corresponding pairs of elements in 17.53/5.66 * the two lists are equal. (Two elements {@code e1} and 17.53/5.66 * {@code e2} are equal if {@code (e1==null ? e2==null : 17.53/5.66 * e1.equals(e2))}.) In other words, two lists are defined to be 17.53/5.66 * equal if they contain the same elements in the same order.

17.53/5.66 * 17.53/5.66 * This implementation first checks if the specified object is this 17.53/5.66 * list. If so, it returns {@code true}; if not, it checks if the 17.53/5.66 * specified object is a list. If not, it returns {@code false}; if so, 17.53/5.66 * it iterates over both lists, comparing corresponding pairs of elements. 17.53/5.66 * If any comparison returns {@code false}, this method returns 17.53/5.66 * {@code false}. If either iterator runs out of elements before the 17.53/5.66 * other it returns {@code false} (as the lists are of unequal length); 17.53/5.66 * otherwise it returns {@code true} when the iterations complete. 17.53/5.66 * 17.53/5.66 * @param o the object to be compared for equality with this list 17.53/5.66 * @return {@code true} if the specified object is equal to this list 17.53/5.66 */ 17.53/5.66 public boolean equals(Object o) { 17.53/5.66 if (o == this) 17.53/5.66 return true; 17.53/5.66 if (!(o instanceof List)) 17.53/5.66 return false; 17.53/5.66 17.53/5.66 ListIterator e1 = listIterator(); 17.53/5.66 ListIterator e2 = ((List) o).listIterator(); 17.53/5.66 while(e1.hasNext() && e2.hasNext()) { 17.53/5.66 E o1 = e1.next(); 17.53/5.66 Object o2 = e2.next(); 17.53/5.66 if (!(o1==null ? o2==null : o1.equals(o2))) 17.53/5.66 return false; 17.53/5.66 } 17.53/5.66 return !(e1.hasNext() || e2.hasNext()); 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns the hash code value for this list. 17.53/5.66 * 17.53/5.66 *

This implementation uses exactly the code that is used to define the 17.53/5.66 * list hash function in the documentation for the {@link List#hashCode} 17.53/5.66 * method. 17.53/5.66 * 17.53/5.66 * @return the hash code value for this list 17.53/5.66 */ 17.53/5.66 public int hashCode() { 17.53/5.66 int hashCode = 1; 17.53/5.66 Iterator it = this.iterator(); 17.53/5.66 while (it.hasNext()) { 17.53/5.66 E e = it.next(); 17.53/5.66 hashCode = 31*hashCode + (e==null ? 0 : e.hashCode()); 17.53/5.66 } 17.53/5.66 return hashCode; 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Removes from this list all of the elements whose index is between 17.53/5.66 * {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. 17.53/5.66 * Shifts any succeeding elements to the left (reduces their index). 17.53/5.66 * This call shortens the list by {@code (toIndex - fromIndex)} elements. 17.53/5.66 * (If {@code toIndex==fromIndex}, this operation has no effect.) 17.53/5.66 * 17.53/5.66 *

This method is called by the {@code clear} operation on this list 17.53/5.66 * and its subLists. Overriding this method to take advantage of 17.53/5.66 * the internals of the list implementation can substantially 17.53/5.66 * improve the performance of the {@code clear} operation on this list 17.53/5.66 * and its subLists. 17.53/5.66 * 17.53/5.66 *

This implementation gets a list iterator positioned before 17.53/5.66 * {@code fromIndex}, and repeatedly calls {@code ListIterator.next} 17.53/5.66 * followed by {@code ListIterator.remove} until the entire range has 17.53/5.66 * been removed. Note: if {@code ListIterator.remove} requires linear 17.53/5.66 * time, this implementation requires quadratic time. 17.53/5.66 * 17.53/5.66 * @param fromIndex index of first element to be removed 17.53/5.66 * @param toIndex index after last element to be removed 17.53/5.66 */ 17.53/5.66 protected void removeRange(int fromIndex, int toIndex) { 17.53/5.66 ListIterator it = listIterator(fromIndex); 17.53/5.66 for (int i=0, n=toIndex-fromIndex; istructurally modified. 17.53/5.66 * Structural modifications are those that change the size of the 17.53/5.66 * list, or otherwise perturb it in such a fashion that iterations in 17.53/5.66 * progress may yield incorrect results. 17.53/5.66 * 17.53/5.66 *

This field is used by the iterator and list iterator implementation 17.53/5.66 * returned by the {@code iterator} and {@code listIterator} methods. 17.53/5.66 * If the value of this field changes unexpectedly, the iterator (or list 17.53/5.66 * iterator) will throw a {@code ConcurrentModificationException} in 17.53/5.66 * response to the {@code next}, {@code remove}, {@code previous}, 17.53/5.66 * {@code set} or {@code add} operations. This provides 17.53/5.66 * fail-fast behavior, rather than non-deterministic behavior in 17.53/5.66 * the face of concurrent modification during iteration. 17.53/5.66 * 17.53/5.66 *

Use of this field by subclasses is optional. If a subclass 17.53/5.66 * wishes to provide fail-fast iterators (and list iterators), then it 17.53/5.66 * merely has to increment this field in its {@code add(int, E)} and 17.53/5.66 * {@code remove(int)} methods (and any other methods that it overrides 17.53/5.66 * that result in structural modifications to the list). A single call to 17.53/5.66 * {@code add(int, E)} or {@code remove(int)} must add no more than 17.53/5.66 * one to this field, or the iterators (and list iterators) will throw 17.53/5.66 * bogus {@code ConcurrentModificationExceptions}. If an implementation 17.53/5.66 * does not wish to provide fail-fast iterators, this field may be 17.53/5.66 * ignored. 17.53/5.66 */ 17.53/5.66 protected transient int modCount = 0; 17.53/5.66 17.53/5.66 private void rangeCheckForAdd(int index) { 17.53/5.66 if (index < 0 || index > size()) 17.53/5.66 throw new IndexOutOfBoundsException(outOfBoundsMsg(index)); 17.53/5.66 } 17.53/5.66 17.53/5.66 private String outOfBoundsMsg(int index) { 17.53/5.66 return ""; 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 class SubList extends AbstractList { 17.53/5.66 private final AbstractList l; 17.53/5.66 private final int offset; 17.53/5.66 private int size; 17.53/5.66 17.53/5.66 SubList(AbstractList list, int fromIndex, int toIndex) { 17.53/5.66 if (fromIndex < 0) 17.53/5.66 throw new IndexOutOfBoundsException(); 17.53/5.66 if (toIndex > list.size()) 17.53/5.66 throw new IndexOutOfBoundsException(); 17.53/5.66 if (fromIndex > toIndex) 17.53/5.66 throw new IllegalArgumentException(); 17.53/5.66 l = list; 17.53/5.66 offset = fromIndex; 17.53/5.66 size = toIndex - fromIndex; 17.53/5.66 this.modCount = l.modCount; 17.53/5.66 } 17.53/5.66 17.53/5.66 public E set(int index, E element) { 17.53/5.66 rangeCheck(index); 17.53/5.66 checkForComodification(); 17.53/5.66 return l.set(index+offset, element); 17.53/5.66 } 17.53/5.66 17.53/5.66 public E get(int index) { 17.53/5.66 rangeCheck(index); 17.53/5.66 checkForComodification(); 17.53/5.66 return l.get(index+offset); 17.53/5.66 } 17.53/5.66 17.53/5.66 public int size() { 17.53/5.66 checkForComodification(); 17.53/5.66 return size; 17.53/5.66 } 17.53/5.66 17.53/5.66 public void add(int index, E element) { 17.53/5.66 rangeCheckForAdd(index); 17.53/5.66 checkForComodification(); 17.53/5.66 l.add(index+offset, element); 17.53/5.66 this.modCount = l.modCount; 17.53/5.66 size++; 17.53/5.66 } 17.53/5.66 17.53/5.66 public E remove(int index) { 17.53/5.66 rangeCheck(index); 17.53/5.66 checkForComodification(); 17.53/5.66 E result = l.remove(index+offset); 17.53/5.66 this.modCount = l.modCount; 17.53/5.66 size--; 17.53/5.66 return result; 17.53/5.66 } 17.53/5.66 17.53/5.66 protected void removeRange(int fromIndex, int toIndex) { 17.53/5.66 checkForComodification(); 17.53/5.66 l.removeRange(fromIndex+offset, toIndex+offset); 17.53/5.66 this.modCount = l.modCount; 17.53/5.66 size -= (toIndex-fromIndex); 17.53/5.66 } 17.53/5.66 17.53/5.66 public boolean addAll(Collection c) { 17.53/5.66 return addAll(size, c); 17.53/5.66 } 17.53/5.66 17.53/5.66 public boolean addAll(int index, Collection c) { 17.53/5.66 rangeCheckForAdd(index); 17.53/5.66 int cSize = c.size(); 17.53/5.66 if (cSize==0) 17.53/5.66 return false; 17.53/5.66 17.53/5.66 checkForComodification(); 17.53/5.66 l.addAll(offset+index, c); 17.53/5.66 this.modCount = l.modCount; 17.53/5.66 size += cSize; 17.53/5.66 return true; 17.53/5.66 } 17.53/5.66 17.53/5.66 public Iterator iterator() { 17.53/5.66 return listIterator(); 17.53/5.66 } 17.53/5.66 17.53/5.66 public ListIterator listIterator(final int index) { 17.53/5.66 checkForComodification(); 17.53/5.66 rangeCheckForAdd(index); 17.53/5.66 17.53/5.66 return new ListIterator() { 17.53/5.66 private final ListIterator i = l.listIterator(index+offset); 17.53/5.66 17.53/5.66 public boolean hasNext() { 17.53/5.66 return nextIndex() < size; 17.53/5.66 } 17.53/5.66 17.53/5.66 public E next() { 17.53/5.66 if (hasNext()) 17.53/5.66 return i.next(); 17.53/5.66 else 17.53/5.66 throw new NoSuchElementException(); 17.53/5.66 } 17.53/5.66 17.53/5.66 public boolean hasPrevious() { 17.53/5.66 return previousIndex() >= 0; 17.53/5.66 } 17.53/5.66 17.53/5.66 public E previous() { 17.53/5.66 if (hasPrevious()) 17.53/5.66 return i.previous(); 17.53/5.66 else 17.53/5.66 throw new NoSuchElementException(); 17.53/5.66 } 17.53/5.66 17.53/5.66 public int nextIndex() { 17.53/5.66 return i.nextIndex() - offset; 17.53/5.66 } 17.53/5.66 17.53/5.66 public int previousIndex() { 17.53/5.66 return i.previousIndex() - offset; 17.53/5.66 } 17.53/5.66 17.53/5.66 public void remove() { 17.53/5.66 i.remove(); 17.53/5.66 SubList.this.modCount = l.modCount; 17.53/5.66 size--; 17.53/5.66 } 17.53/5.66 17.53/5.66 public void set(E e) { 17.53/5.66 i.set(e); 17.53/5.66 } 17.53/5.66 17.53/5.66 public void add(E e) { 17.53/5.66 i.add(e); 17.53/5.66 SubList.this.modCount = l.modCount; 17.53/5.66 size++; 17.53/5.66 } 17.53/5.66 }; 17.53/5.66 } 17.53/5.66 17.53/5.66 public List subList(int fromIndex, int toIndex) { 17.53/5.66 return new SubList(this, fromIndex, toIndex); 17.53/5.66 } 17.53/5.66 17.53/5.66 private void rangeCheck(int index) { 17.53/5.66 if (index < 0 || index >= size) 17.53/5.66 throw new IndexOutOfBoundsException(outOfBoundsMsg(index)); 17.53/5.66 } 17.53/5.66 17.53/5.66 private void rangeCheckForAdd(int index) { 17.53/5.66 if (index < 0 || index > size) 17.53/5.66 throw new IndexOutOfBoundsException(outOfBoundsMsg(index)); 17.53/5.66 } 17.53/5.66 17.53/5.66 private String outOfBoundsMsg(int index) { 17.53/5.66 return ""; 17.53/5.66 } 17.53/5.66 17.53/5.66 private void checkForComodification() { 17.53/5.66 if (this.modCount != l.modCount) 17.53/5.66 throw new ConcurrentModificationException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 class RandomAccessSubList extends SubList implements RandomAccess { 17.53/5.66 RandomAccessSubList(AbstractList list, int fromIndex, int toIndex) { 17.53/5.66 super(list, fromIndex, toIndex); 17.53/5.66 } 17.53/5.66 17.53/5.66 public List subList(int fromIndex, int toIndex) { 17.53/5.66 return new RandomAccessSubList(this, fromIndex, toIndex); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 17.53/5.66 /* 17.53/5.66 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.66 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.66 * 17.53/5.66 * This code is free software; you can redistribute it and/or modify it 17.53/5.66 * under the terms of the GNU General Public License version 2 only, as 17.53/5.66 * published by the Free Software Foundation. Sun designates this 17.53/5.66 * particular file as subject to the "Classpath" exception as provided 17.53/5.66 * by Sun in the LICENSE file that accompanied this code. 17.53/5.66 * 17.53/5.66 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.66 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.66 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.66 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.66 * accompanied this code). 17.53/5.66 * 17.53/5.66 * You should have received a copy of the GNU General Public License version 17.53/5.66 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.66 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.66 * 17.53/5.66 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.66 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.66 * have any questions. 17.53/5.66 */ 17.53/5.66 17.53/5.66 package javaUtilEx; 17.53/5.66 17.53/5.66 /** 17.53/5.66 * This class provides a skeletal implementation of the List 17.53/5.66 * interface to minimize the effort required to implement this interface 17.53/5.66 * backed by a "sequential access" data store (such as a linked list). For 17.53/5.66 * random access data (such as an array), AbstractList should be used 17.53/5.66 * in preference to this class.

17.53/5.66 * 17.53/5.66 * This class is the opposite of the AbstractList class in the sense 17.53/5.66 * that it implements the "random access" methods (get(int index), 17.53/5.66 * set(int index, E element), add(int index, E element) and 17.53/5.66 * remove(int index)) on top of the list's list iterator, instead of 17.53/5.66 * the other way around.

17.53/5.66 * 17.53/5.66 * To implement a list the programmer needs only to extend this class and 17.53/5.66 * provide implementations for the listIterator and size 17.53/5.66 * methods. For an unmodifiable list, the programmer need only implement the 17.53/5.66 * list iterator's hasNext, next, hasPrevious, 17.53/5.66 * previous and index methods.

17.53/5.66 * 17.53/5.66 * For a modifiable list the programmer should additionally implement the list 17.53/5.66 * iterator's set method. For a variable-size list the programmer 17.53/5.66 * should additionally implement the list iterator's remove and 17.53/5.66 * add methods.

17.53/5.66 * 17.53/5.66 * The programmer should generally provide a void (no argument) and collection 17.53/5.66 * constructor, as per the recommendation in the Collection interface 17.53/5.66 * specification.

17.53/5.66 * 17.53/5.66 * This class is a member of the 17.53/5.66 * 17.53/5.66 * Java Collections Framework. 17.53/5.66 * 17.53/5.66 * @author Josh Bloch 17.53/5.66 * @author Neal Gafter 17.53/5.66 * @see Collection 17.53/5.66 * @see List 17.53/5.66 * @see AbstractList 17.53/5.66 * @see AbstractCollection 17.53/5.66 * @since 1.2 17.53/5.66 */ 17.53/5.66 17.53/5.66 public abstract class AbstractSequentialList extends AbstractList { 17.53/5.66 /** 17.53/5.66 * Sole constructor. (For invocation by subclass constructors, typically 17.53/5.66 * implicit.) 17.53/5.66 */ 17.53/5.66 protected AbstractSequentialList() { 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns the element at the specified position in this list. 17.53/5.66 * 17.53/5.66 *

This implementation first gets a list iterator pointing to the 17.53/5.66 * indexed element (with listIterator(index)). Then, it gets 17.53/5.66 * the element using ListIterator.next and returns it. 17.53/5.66 * 17.53/5.66 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.66 */ 17.53/5.66 public E get(int index) { 17.53/5.66 try { 17.53/5.66 return listIterator(index).next(); 17.53/5.66 } catch (NoSuchElementException exc) { 17.53/5.66 throw new IndexOutOfBoundsException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Replaces the element at the specified position in this list with the 17.53/5.66 * specified element (optional operation). 17.53/5.66 * 17.53/5.66 *

This implementation first gets a list iterator pointing to the 17.53/5.66 * indexed element (with listIterator(index)). Then, it gets 17.53/5.66 * the current element using ListIterator.next and replaces it 17.53/5.66 * with ListIterator.set. 17.53/5.66 * 17.53/5.66 *

Note that this implementation will throw an 17.53/5.66 * UnsupportedOperationException if the list iterator does not 17.53/5.66 * implement the set operation. 17.53/5.66 * 17.53/5.66 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.66 * @throws ClassCastException {@inheritDoc} 17.53/5.66 * @throws NullPointerException {@inheritDoc} 17.53/5.66 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.66 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.66 */ 17.53/5.66 public E set(int index, E element) { 17.53/5.66 try { 17.53/5.66 ListIterator e = listIterator(index); 17.53/5.66 E oldVal = e.next(); 17.53/5.66 e.set(element); 17.53/5.66 return oldVal; 17.53/5.66 } catch (NoSuchElementException exc) { 17.53/5.66 throw new IndexOutOfBoundsException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Inserts the specified element at the specified position in this list 17.53/5.66 * (optional operation). Shifts the element currently at that position 17.53/5.66 * (if any) and any subsequent elements to the right (adds one to their 17.53/5.66 * indices). 17.53/5.66 * 17.53/5.66 *

This implementation first gets a list iterator pointing to the 17.53/5.66 * indexed element (with listIterator(index)). Then, it 17.53/5.66 * inserts the specified element with ListIterator.add. 17.53/5.66 * 17.53/5.66 *

Note that this implementation will throw an 17.53/5.66 * UnsupportedOperationException if the list iterator does not 17.53/5.66 * implement the add operation. 17.53/5.66 * 17.53/5.66 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.66 * @throws ClassCastException {@inheritDoc} 17.53/5.66 * @throws NullPointerException {@inheritDoc} 17.53/5.66 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.66 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.66 */ 17.53/5.66 public void add(int index, E element) { 17.53/5.66 try { 17.53/5.66 listIterator(index).add(element); 17.53/5.66 } catch (NoSuchElementException exc) { 17.53/5.66 throw new IndexOutOfBoundsException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Removes the element at the specified position in this list (optional 17.53/5.66 * operation). Shifts any subsequent elements to the left (subtracts one 17.53/5.66 * from their indices). Returns the element that was removed from the 17.53/5.66 * list. 17.53/5.66 * 17.53/5.66 *

This implementation first gets a list iterator pointing to the 17.53/5.66 * indexed element (with listIterator(index)). Then, it removes 17.53/5.66 * the element with ListIterator.remove. 17.53/5.66 * 17.53/5.66 *

Note that this implementation will throw an 17.53/5.66 * UnsupportedOperationException if the list iterator does not 17.53/5.66 * implement the remove operation. 17.53/5.66 * 17.53/5.66 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.66 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.66 */ 17.53/5.66 public E remove(int index) { 17.53/5.66 try { 17.53/5.66 ListIterator e = listIterator(index); 17.53/5.66 E outCast = e.next(); 17.53/5.66 e.remove(); 17.53/5.66 return outCast; 17.53/5.66 } catch (NoSuchElementException exc) { 17.53/5.66 throw new IndexOutOfBoundsException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 17.53/5.66 // Bulk Operations 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Inserts all of the elements in the specified collection into this 17.53/5.66 * list at the specified position (optional operation). Shifts the 17.53/5.66 * element currently at that position (if any) and any subsequent 17.53/5.66 * elements to the right (increases their indices). The new elements 17.53/5.66 * will appear in this list in the order that they are returned by the 17.53/5.66 * specified collection's iterator. The behavior of this operation is 17.53/5.66 * undefined if the specified collection is modified while the 17.53/5.66 * operation is in progress. (Note that this will occur if the specified 17.53/5.66 * collection is this list, and it's nonempty.) 17.53/5.66 * 17.53/5.66 *

This implementation gets an iterator over the specified collection and 17.53/5.66 * a list iterator over this list pointing to the indexed element (with 17.53/5.66 * listIterator(index)). Then, it iterates over the specified 17.53/5.66 * collection, inserting the elements obtained from the iterator into this 17.53/5.66 * list, one at a time, using ListIterator.add followed by 17.53/5.66 * ListIterator.next (to skip over the added element). 17.53/5.66 * 17.53/5.66 *

Note that this implementation will throw an 17.53/5.66 * UnsupportedOperationException if the list iterator returned by 17.53/5.66 * the listIterator method does not implement the add 17.53/5.66 * operation. 17.53/5.66 * 17.53/5.66 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.66 * @throws ClassCastException {@inheritDoc} 17.53/5.66 * @throws NullPointerException {@inheritDoc} 17.53/5.66 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.66 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.66 */ 17.53/5.66 public boolean addAll(int index, Collection c) { 17.53/5.66 try { 17.53/5.66 boolean modified = false; 17.53/5.66 ListIterator e1 = listIterator(index); 17.53/5.66 Iterator e2 = c.iterator(); 17.53/5.66 while (e2.hasNext()) { 17.53/5.66 e1.add(e2.next()); 17.53/5.66 modified = true; 17.53/5.66 } 17.53/5.66 return modified; 17.53/5.66 } catch (NoSuchElementException exc) { 17.53/5.66 throw new IndexOutOfBoundsException(); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 17.53/5.66 // Iterators 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns an iterator over the elements in this list (in proper 17.53/5.66 * sequence).

17.53/5.66 * 17.53/5.66 * This implementation merely returns a list iterator over the list. 17.53/5.66 * 17.53/5.66 * @return an iterator over the elements in this list (in proper sequence) 17.53/5.66 */ 17.53/5.66 public Iterator iterator() { 17.53/5.66 return listIterator(); 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns a list iterator over the elements in this list (in proper 17.53/5.66 * sequence). 17.53/5.66 * 17.53/5.66 * @param index index of first element to be returned from the list 17.53/5.66 * iterator (by a call to the next method) 17.53/5.66 * @return a list iterator over the elements in this list (in proper 17.53/5.66 * sequence) 17.53/5.66 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.66 */ 17.53/5.66 public abstract ListIterator listIterator(int index); 17.53/5.66 } 17.53/5.66 17.53/5.66 17.53/5.66 /* 17.53/5.66 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.66 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.66 * 17.53/5.66 * This code is free software; you can redistribute it and/or modify it 17.53/5.66 * under the terms of the GNU General Public License version 2 only, as 17.53/5.66 * published by the Free Software Foundation. Sun designates this 17.53/5.66 * particular file as subject to the "Classpath" exception as provided 17.53/5.66 * by Sun in the LICENSE file that accompanied this code. 17.53/5.66 * 17.53/5.66 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.66 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.66 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.66 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.66 * accompanied this code). 17.53/5.66 * 17.53/5.66 * You should have received a copy of the GNU General Public License version 17.53/5.66 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.66 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.66 * 17.53/5.66 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.66 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.66 * have any questions. 17.53/5.66 */ 17.53/5.66 17.53/5.66 package javaUtilEx; 17.53/5.66 17.53/5.66 /** 17.53/5.66 * The root interface in the collection hierarchy. A collection 17.53/5.66 * represents a group of objects, known as its elements. Some 17.53/5.66 * collections allow duplicate elements and others do not. Some are ordered 17.53/5.66 * and others unordered. The JDK does not provide any direct 17.53/5.66 * implementations of this interface: it provides implementations of more 17.53/5.66 * specific subinterfaces like Set and List. This interface 17.53/5.66 * is typically used to pass collections around and manipulate them where 17.53/5.66 * maximum generality is desired. 17.53/5.66 * 17.53/5.66 *

Bags or multisets (unordered collections that may contain 17.53/5.66 * duplicate elements) should implement this interface directly. 17.53/5.66 * 17.53/5.66 *

All general-purpose Collection implementation classes (which 17.53/5.66 * typically implement Collection indirectly through one of its 17.53/5.66 * subinterfaces) should provide two "standard" constructors: a void (no 17.53/5.66 * arguments) constructor, which creates an empty collection, and a 17.53/5.66 * constructor with a single argument of type Collection, which 17.53/5.66 * creates a new collection with the same elements as its argument. In 17.53/5.66 * effect, the latter constructor allows the user to copy any collection, 17.53/5.66 * producing an equivalent collection of the desired implementation type. 17.53/5.66 * There is no way to enforce this convention (as interfaces cannot contain 17.53/5.66 * constructors) but all of the general-purpose Collection 17.53/5.66 * implementations in the Java platform libraries comply. 17.53/5.66 * 17.53/5.66 *

The "destructive" methods contained in this interface, that is, the 17.53/5.66 * methods that modify the collection on which they operate, are specified to 17.53/5.66 * throw UnsupportedOperationException if this collection does not 17.53/5.66 * support the operation. If this is the case, these methods may, but are not 17.53/5.66 * required to, throw an UnsupportedOperationException if the 17.53/5.66 * invocation would have no effect on the collection. For example, invoking 17.53/5.66 * the {@link #addAll(Collection)} method on an unmodifiable collection may, 17.53/5.66 * but is not required to, throw the exception if the collection to be added 17.53/5.66 * is empty. 17.53/5.66 * 17.53/5.66 *

Some collection implementations have restrictions on the elements that 17.53/5.66 * they may contain. For example, some implementations prohibit null elements, 17.53/5.66 * and some have restrictions on the types of their elements. Attempting to 17.53/5.66 * add an ineligible element throws an unchecked exception, typically 17.53/5.66 * NullPointerException or ClassCastException. Attempting 17.53/5.66 * to query the presence of an ineligible element may throw an exception, 17.53/5.66 * or it may simply return false; some implementations will exhibit the former 17.53/5.66 * behavior and some will exhibit the latter. More generally, attempting an 17.53/5.66 * operation on an ineligible element whose completion would not result in 17.53/5.66 * the insertion of an ineligible element into the collection may throw an 17.53/5.66 * exception or it may succeed, at the option of the implementation. 17.53/5.66 * Such exceptions are marked as "optional" in the specification for this 17.53/5.66 * interface. 17.53/5.66 * 17.53/5.66 *

It is up to each collection to determine its own synchronization 17.53/5.66 * policy. In the absence of a stronger guarantee by the 17.53/5.66 * implementation, undefined behavior may result from the invocation 17.53/5.66 * of any method on a collection that is being mutated by another 17.53/5.66 * thread; this includes direct invocations, passing the collection to 17.53/5.66 * a method that might perform invocations, and using an existing 17.53/5.66 * iterator to examine the collection. 17.53/5.66 * 17.53/5.66 *

Many methods in Collections Framework interfaces are defined in 17.53/5.66 * terms of the {@link Object#equals(Object) equals} method. For example, 17.53/5.66 * the specification for the {@link #contains(Object) contains(Object o)} 17.53/5.66 * method says: "returns true if and only if this collection 17.53/5.66 * contains at least one element e such that 17.53/5.66 * (o==null ? e==null : o.equals(e))." This specification should 17.53/5.66 * not be construed to imply that invoking Collection.contains 17.53/5.66 * with a non-null argument o will cause o.equals(e) to be 17.53/5.66 * invoked for any element e. Implementations are free to implement 17.53/5.66 * optimizations whereby the equals invocation is avoided, for 17.53/5.66 * example, by first comparing the hash codes of the two elements. (The 17.53/5.66 * {@link Object#hashCode()} specification guarantees that two objects with 17.53/5.66 * unequal hash codes cannot be equal.) More generally, implementations of 17.53/5.66 * the various Collections Framework interfaces are free to take advantage of 17.53/5.66 * the specified behavior of underlying {@link Object} methods wherever the 17.53/5.66 * implementor deems it appropriate. 17.53/5.66 * 17.53/5.66 *

This interface is a member of the 17.53/5.66 * 17.53/5.66 * Java Collections Framework. 17.53/5.66 * 17.53/5.66 * @author Josh Bloch 17.53/5.66 * @author Neal Gafter 17.53/5.66 * @see Set 17.53/5.66 * @see List 17.53/5.66 * @see Map 17.53/5.66 * @see SortedSet 17.53/5.66 * @see SortedMap 17.53/5.66 * @see HashSet 17.53/5.66 * @see TreeSet 17.53/5.66 * @see ArrayList 17.53/5.66 * @see LinkedList 17.53/5.66 * @see Vector 17.53/5.66 * @see Collections 17.53/5.66 * @see Arrays 17.53/5.66 * @see AbstractCollection 17.53/5.66 * @since 1.2 17.53/5.66 */ 17.53/5.66 17.53/5.66 public interface Collection { 17.53/5.66 // Query Operations 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns the number of elements in this collection. If this collection 17.53/5.66 * contains more than Integer.MAX_VALUE elements, returns 17.53/5.66 * Integer.MAX_VALUE. 17.53/5.66 * 17.53/5.66 * @return the number of elements in this collection 17.53/5.66 */ 17.53/5.66 int size(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns true if this collection contains no elements. 17.53/5.66 * 17.53/5.66 * @return true if this collection contains no elements 17.53/5.66 */ 17.53/5.66 boolean isEmpty(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns true if this collection contains the specified element. 17.53/5.66 * More formally, returns true if and only if this collection 17.53/5.66 * contains at least one element e such that 17.53/5.66 * (o==null ? e==null : o.equals(e)). 17.53/5.66 * 17.53/5.66 * @param o element whose presence in this collection is to be tested 17.53/5.66 * @return true if this collection contains the specified 17.53/5.66 * element 17.53/5.66 * @throws ClassCastException if the type of the specified element 17.53/5.66 * is incompatible with this collection (optional) 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * collection does not permit null elements (optional) 17.53/5.66 */ 17.53/5.66 boolean contains(Object o); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns an iterator over the elements in this collection. There are no 17.53/5.66 * guarantees concerning the order in which the elements are returned 17.53/5.66 * (unless this collection is an instance of some class that provides a 17.53/5.66 * guarantee). 17.53/5.66 * 17.53/5.66 * @return an Iterator over the elements in this collection 17.53/5.66 */ 17.53/5.66 Iterator iterator(); 17.53/5.66 17.53/5.66 // Modification Operations 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Ensures that this collection contains the specified element (optional 17.53/5.66 * operation). Returns true if this collection changed as a 17.53/5.66 * result of the call. (Returns false if this collection does 17.53/5.66 * not permit duplicates and already contains the specified element.)

17.53/5.66 * 17.53/5.66 * Collections that support this operation may place limitations on what 17.53/5.66 * elements may be added to this collection. In particular, some 17.53/5.66 * collections will refuse to add null elements, and others will 17.53/5.66 * impose restrictions on the type of elements that may be added. 17.53/5.66 * Collection classes should clearly specify in their documentation any 17.53/5.66 * restrictions on what elements may be added.

17.53/5.66 * 17.53/5.66 * If a collection refuses to add a particular element for any reason 17.53/5.66 * other than that it already contains the element, it must throw 17.53/5.66 * an exception (rather than returning false). This preserves 17.53/5.66 * the invariant that a collection always contains the specified element 17.53/5.66 * after this call returns. 17.53/5.66 * 17.53/5.66 * @param e element whose presence in this collection is to be ensured 17.53/5.66 * @return true if this collection changed as a result of the 17.53/5.66 * call 17.53/5.66 * @throws UnsupportedOperationException if the add operation 17.53/5.66 * is not supported by this collection 17.53/5.66 * @throws ClassCastException if the class of the specified element 17.53/5.66 * prevents it from being added to this collection 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * collection does not permit null elements 17.53/5.66 * @throws IllegalArgumentException if some property of the element 17.53/5.66 * prevents it from being added to this collection 17.53/5.66 * @throws IllegalStateException if the element cannot be added at this 17.53/5.66 * time due to insertion restrictions 17.53/5.66 */ 17.53/5.66 boolean add(E e); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Removes a single instance of the specified element from this 17.53/5.66 * collection, if it is present (optional operation). More formally, 17.53/5.66 * removes an element e such that 17.53/5.66 * (o==null ? e==null : o.equals(e)), if 17.53/5.66 * this collection contains one or more such elements. Returns 17.53/5.66 * true if this collection contained the specified element (or 17.53/5.66 * equivalently, if this collection changed as a result of the call). 17.53/5.66 * 17.53/5.66 * @param o element to be removed from this collection, if present 17.53/5.66 * @return true if an element was removed as a result of this call 17.53/5.66 * @throws ClassCastException if the type of the specified element 17.53/5.66 * is incompatible with this collection (optional) 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * collection does not permit null elements (optional) 17.53/5.66 * @throws UnsupportedOperationException if the remove operation 17.53/5.66 * is not supported by this collection 17.53/5.66 */ 17.53/5.66 boolean remove(Object o); 17.53/5.66 17.53/5.66 17.53/5.66 // Bulk Operations 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns true if this collection contains all of the elements 17.53/5.66 * in the specified collection. 17.53/5.66 * 17.53/5.66 * @param c collection to be checked for containment in this collection 17.53/5.66 * @return true if this collection contains all of the elements 17.53/5.66 * in the specified collection 17.53/5.66 * @throws ClassCastException if the types of one or more elements 17.53/5.66 * in the specified collection are incompatible with this 17.53/5.66 * collection (optional) 17.53/5.66 * @throws NullPointerException if the specified collection contains one 17.53/5.66 * or more null elements and this collection does not permit null 17.53/5.66 * elements (optional), or if the specified collection is null 17.53/5.66 * @see #contains(Object) 17.53/5.66 */ 17.53/5.66 boolean containsAll(Collection c); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Adds all of the elements in the specified collection to this collection 17.53/5.66 * (optional operation). The behavior of this operation is undefined if 17.53/5.66 * the specified collection is modified while the operation is in progress. 17.53/5.66 * (This implies that the behavior of this call is undefined if the 17.53/5.66 * specified collection is this collection, and this collection is 17.53/5.66 * nonempty.) 17.53/5.66 * 17.53/5.66 * @param c collection containing elements to be added to this collection 17.53/5.66 * @return true if this collection changed as a result of the call 17.53/5.66 * @throws UnsupportedOperationException if the addAll operation 17.53/5.66 * is not supported by this collection 17.53/5.66 * @throws ClassCastException if the class of an element of the specified 17.53/5.66 * collection prevents it from being added to this collection 17.53/5.66 * @throws NullPointerException if the specified collection contains a 17.53/5.66 * null element and this collection does not permit null elements, 17.53/5.66 * or if the specified collection is null 17.53/5.66 * @throws IllegalArgumentException if some property of an element of the 17.53/5.66 * specified collection prevents it from being added to this 17.53/5.66 * collection 17.53/5.66 * @throws IllegalStateException if not all the elements can be added at 17.53/5.66 * this time due to insertion restrictions 17.53/5.66 * @see #add(Object) 17.53/5.66 */ 17.53/5.66 boolean addAll(Collection c); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Removes all of this collection's elements that are also contained in the 17.53/5.66 * specified collection (optional operation). After this call returns, 17.53/5.66 * this collection will contain no elements in common with the specified 17.53/5.66 * collection. 17.53/5.66 * 17.53/5.66 * @param c collection containing elements to be removed from this collection 17.53/5.66 * @return true if this collection changed as a result of the 17.53/5.66 * call 17.53/5.66 * @throws UnsupportedOperationException if the removeAll method 17.53/5.66 * is not supported by this collection 17.53/5.66 * @throws ClassCastException if the types of one or more elements 17.53/5.66 * in this collection are incompatible with the specified 17.53/5.66 * collection (optional) 17.53/5.66 * @throws NullPointerException if this collection contains one or more 17.53/5.66 * null elements and the specified collection does not support 17.53/5.66 * null elements (optional), or if the specified collection is null 17.53/5.66 * @see #remove(Object) 17.53/5.66 * @see #contains(Object) 17.53/5.66 */ 17.53/5.66 boolean removeAll(Collection c); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retains only the elements in this collection that are contained in the 17.53/5.66 * specified collection (optional operation). In other words, removes from 17.53/5.66 * this collection all of its elements that are not contained in the 17.53/5.66 * specified collection. 17.53/5.66 * 17.53/5.66 * @param c collection containing elements to be retained in this collection 17.53/5.66 * @return true if this collection changed as a result of the call 17.53/5.66 * @throws UnsupportedOperationException if the retainAll operation 17.53/5.66 * is not supported by this collection 17.53/5.66 * @throws ClassCastException if the types of one or more elements 17.53/5.66 * in this collection are incompatible with the specified 17.53/5.66 * collection (optional) 17.53/5.66 * @throws NullPointerException if this collection contains one or more 17.53/5.66 * null elements and the specified collection does not permit null 17.53/5.66 * elements (optional), or if the specified collection is null 17.53/5.66 * @see #remove(Object) 17.53/5.66 * @see #contains(Object) 17.53/5.66 */ 17.53/5.66 boolean retainAll(Collection c); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Removes all of the elements from this collection (optional operation). 17.53/5.66 * The collection will be empty after this method returns. 17.53/5.66 * 17.53/5.66 * @throws UnsupportedOperationException if the clear operation 17.53/5.66 * is not supported by this collection 17.53/5.66 */ 17.53/5.66 void clear(); 17.53/5.66 17.53/5.66 17.53/5.66 // Comparison and hashing 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Compares the specified object with this collection for equality.

17.53/5.66 * 17.53/5.66 * While the Collection interface adds no stipulations to the 17.53/5.66 * general contract for the Object.equals, programmers who 17.53/5.66 * implement the Collection interface "directly" (in other words, 17.53/5.66 * create a class that is a Collection but is not a Set 17.53/5.66 * or a List) must exercise care if they choose to override the 17.53/5.66 * Object.equals. It is not necessary to do so, and the simplest 17.53/5.66 * course of action is to rely on Object's implementation, but 17.53/5.66 * the implementor may wish to implement a "value comparison" in place of 17.53/5.66 * the default "reference comparison." (The List and 17.53/5.66 * Set interfaces mandate such value comparisons.)

17.53/5.66 * 17.53/5.66 * The general contract for the Object.equals method states that 17.53/5.66 * equals must be symmetric (in other words, a.equals(b) if and 17.53/5.66 * only if b.equals(a)). The contracts for List.equals 17.53/5.66 * and Set.equals state that lists are only equal to other lists, 17.53/5.66 * and sets to other sets. Thus, a custom equals method for a 17.53/5.66 * collection class that implements neither the List nor 17.53/5.66 * Set interface must return false when this collection 17.53/5.66 * is compared to any list or set. (By the same logic, it is not possible 17.53/5.66 * to write a class that correctly implements both the Set and 17.53/5.66 * List interfaces.) 17.53/5.66 * 17.53/5.66 * @param o object to be compared for equality with this collection 17.53/5.66 * @return true if the specified object is equal to this 17.53/5.66 * collection 17.53/5.66 * 17.53/5.66 * @see Object#equals(Object) 17.53/5.66 * @see Set#equals(Object) 17.53/5.66 * @see List#equals(Object) 17.53/5.66 */ 17.53/5.66 boolean equals(Object o); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns the hash code value for this collection. While the 17.53/5.66 * Collection interface adds no stipulations to the general 17.53/5.66 * contract for the Object.hashCode method, programmers should 17.53/5.66 * take note that any class that overrides the Object.equals 17.53/5.66 * method must also override the Object.hashCode method in order 17.53/5.66 * to satisfy the general contract for the Object.hashCodemethod. 17.53/5.66 * In particular, c1.equals(c2) implies that 17.53/5.66 * c1.hashCode()==c2.hashCode(). 17.53/5.66 * 17.53/5.66 * @return the hash code value for this collection 17.53/5.66 * 17.53/5.66 * @see Object#hashCode() 17.53/5.66 * @see Object#equals(Object) 17.53/5.66 */ 17.53/5.66 int hashCode(); 17.53/5.66 } 17.53/5.66 17.53/5.66 17.53/5.66 /* 17.53/5.66 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.66 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.66 * 17.53/5.66 * This code is free software; you can redistribute it and/or modify it 17.53/5.66 * under the terms of the GNU General Public License version 2 only, as 17.53/5.66 * published by the Free Software Foundation. Sun designates this 17.53/5.66 * particular file as subject to the "Classpath" exception as provided 17.53/5.66 * by Sun in the LICENSE file that accompanied this code. 17.53/5.66 * 17.53/5.66 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.66 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.66 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.66 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.66 * accompanied this code). 17.53/5.66 * 17.53/5.66 * You should have received a copy of the GNU General Public License version 17.53/5.66 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.66 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.66 * 17.53/5.66 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.66 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.66 * have any questions. 17.53/5.66 */ 17.53/5.66 17.53/5.66 package javaUtilEx; 17.53/5.66 17.53/5.66 /** 17.53/5.66 * This exception may be thrown by methods that have detected concurrent 17.53/5.66 * modification of an object when such modification is not permissible. 17.53/5.66 *

17.53/5.66 * For example, it is not generally permissible for one thread to modify a Collection 17.53/5.66 * while another thread is iterating over it. In general, the results of the 17.53/5.66 * iteration are undefined under these circumstances. Some Iterator 17.53/5.66 * implementations (including those of all the general purpose collection implementations 17.53/5.66 * provided by the JRE) may choose to throw this exception if this behavior is 17.53/5.66 * detected. Iterators that do this are known as fail-fast iterators, 17.53/5.66 * as they fail quickly and cleanly, rather that risking arbitrary, 17.53/5.66 * non-deterministic behavior at an undetermined time in the future. 17.53/5.66 *

17.53/5.66 * Note that this exception does not always indicate that an object has 17.53/5.66 * been concurrently modified by a different thread. If a single 17.53/5.66 * thread issues a sequence of method invocations that violates the 17.53/5.66 * contract of an object, the object may throw this exception. For 17.53/5.66 * example, if a thread modifies a collection directly while it is 17.53/5.66 * iterating over the collection with a fail-fast iterator, the iterator 17.53/5.66 * will throw this exception. 17.53/5.66 * 17.53/5.66 *

Note that fail-fast behavior cannot be guaranteed as it is, generally 17.53/5.66 * speaking, impossible to make any hard guarantees in the presence of 17.53/5.66 * unsynchronized concurrent modification. Fail-fast operations 17.53/5.66 * throw ConcurrentModificationException on a best-effort basis. 17.53/5.66 * Therefore, it would be wrong to write a program that depended on this 17.53/5.66 * exception for its correctness: ConcurrentModificationException 17.53/5.66 * should be used only to detect bugs. 17.53/5.66 * 17.53/5.66 * @author Josh Bloch 17.53/5.66 * @see Collection 17.53/5.66 * @see Iterator 17.53/5.66 * @see ListIterator 17.53/5.66 * @see Vector 17.53/5.66 * @see LinkedList 17.53/5.66 * @see HashSet 17.53/5.66 * @see Hashtable 17.53/5.66 * @see TreeMap 17.53/5.66 * @see AbstractList 17.53/5.66 * @since 1.2 17.53/5.66 */ 17.53/5.66 public class ConcurrentModificationException extends RuntimeException { 17.53/5.66 /** 17.53/5.66 * Constructs a ConcurrentModificationException with no 17.53/5.66 * detail message. 17.53/5.66 */ 17.53/5.66 public ConcurrentModificationException() { 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Constructs a ConcurrentModificationException with the 17.53/5.66 * specified detail message. 17.53/5.66 * 17.53/5.66 * @param message the detail message pertaining to this exception. 17.53/5.66 */ 17.53/5.66 public ConcurrentModificationException(String message) { 17.53/5.66 super(message); 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 17.53/5.66 /* 17.53/5.66 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.66 * 17.53/5.66 * This code is free software; you can redistribute it and/or modify it 17.53/5.66 * under the terms of the GNU General Public License version 2 only, as 17.53/5.66 * published by the Free Software Foundation. Sun designates this 17.53/5.66 * particular file as subject to the "Classpath" exception as provided 17.53/5.66 * by Sun in the LICENSE file that accompanied this code. 17.53/5.66 * 17.53/5.66 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.66 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.66 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.66 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.66 * accompanied this code). 17.53/5.66 * 17.53/5.66 * You should have received a copy of the GNU General Public License version 17.53/5.66 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.66 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.66 * 17.53/5.66 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.66 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.66 * have any questions. 17.53/5.66 */ 17.53/5.66 17.53/5.66 /* 17.53/5.66 * This file is available under and governed by the GNU General Public 17.53/5.66 * License version 2 only, as published by the Free Software Foundation. 17.53/5.66 * However, the following notice accompanied the original version of this 17.53/5.66 * file: 17.53/5.66 * 17.53/5.66 * Written by Doug Lea and Josh Bloch with assistance from members of 17.53/5.66 * JCP JSR-166 Expert Group and released to the public domain, as explained 17.53/5.66 * at http://creativecommons.org/licenses/publicdomain 17.53/5.66 */ 17.53/5.66 17.53/5.66 package javaUtilEx; 17.53/5.66 17.53/5.66 /** 17.53/5.66 * A linear collection that supports element insertion and removal at 17.53/5.66 * both ends. The name deque is short for "double ended queue" 17.53/5.66 * and is usually pronounced "deck". Most Deque 17.53/5.66 * implementations place no fixed limits on the number of elements 17.53/5.66 * they may contain, but this interface supports capacity-restricted 17.53/5.66 * deques as well as those with no fixed size limit. 17.53/5.66 * 17.53/5.66 *

This interface defines methods to access the elements at both 17.53/5.66 * ends of the deque. Methods are provided to insert, remove, and 17.53/5.66 * examine the element. Each of these methods exists in two forms: 17.53/5.66 * one throws an exception if the operation fails, the other returns a 17.53/5.66 * special value (either null or false, depending on 17.53/5.66 * the operation). The latter form of the insert operation is 17.53/5.66 * designed specifically for use with capacity-restricted 17.53/5.66 * Deque implementations; in most implementations, insert 17.53/5.66 * operations cannot fail. 17.53/5.66 * 17.53/5.66 *

The twelve methods described above are summarized in the 17.53/5.66 * following table: 17.53/5.66 * 17.53/5.66 *

17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 *
First Element (Head) Last Element (Tail)
Throws exceptionSpecial valueThrows exceptionSpecial value
Insert{@link #addFirst addFirst(e)}{@link #offerFirst offerFirst(e)}{@link #addLast addLast(e)}{@link #offerLast offerLast(e)}
Remove{@link #removeFirst removeFirst()}{@link #pollFirst pollFirst()}{@link #removeLast removeLast()}{@link #pollLast pollLast()}
Examine{@link #getFirst getFirst()}{@link #peekFirst peekFirst()}{@link #getLast getLast()}{@link #peekLast peekLast()}
17.53/5.66 * 17.53/5.66 *

This interface extends the {@link Queue} interface. When a deque is 17.53/5.66 * used as a queue, FIFO (First-In-First-Out) behavior results. Elements are 17.53/5.66 * added at the end of the deque and removed from the beginning. The methods 17.53/5.66 * inherited from the Queue interface are precisely equivalent to 17.53/5.66 * Deque methods as indicated in the following table: 17.53/5.66 * 17.53/5.66 *

17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 *
Queue Method Equivalent Deque Method
{@link java.util.Queue#add add(e)}{@link #addLast addLast(e)}
{@link java.util.Queue#offer offer(e)}{@link #offerLast offerLast(e)}
{@link java.util.Queue#remove remove()}{@link #removeFirst removeFirst()}
{@link java.util.Queue#poll poll()}{@link #pollFirst pollFirst()}
{@link java.util.Queue#element element()}{@link #getFirst getFirst()}
{@link java.util.Queue#peek peek()}{@link #peek peekFirst()}
17.53/5.66 * 17.53/5.66 *

Deques can also be used as LIFO (Last-In-First-Out) stacks. This 17.53/5.66 * interface should be used in preference to the legacy {@link Stack} class. 17.53/5.66 * When a deque is used as a stack, elements are pushed and popped from the 17.53/5.66 * beginning of the deque. Stack methods are precisely equivalent to 17.53/5.66 * Deque methods as indicated in the table below: 17.53/5.66 * 17.53/5.66 *

17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 * 17.53/5.66 *
Stack Method Equivalent Deque Method
{@link #push push(e)}{@link #addFirst addFirst(e)}
{@link #pop pop()}{@link #removeFirst removeFirst()}
{@link #peek peek()}{@link #peekFirst peekFirst()}
17.53/5.66 * 17.53/5.66 *

Note that the {@link #peek peek} method works equally well when 17.53/5.66 * a deque is used as a queue or a stack; in either case, elements are 17.53/5.66 * drawn from the beginning of the deque. 17.53/5.66 * 17.53/5.66 *

This interface provides two methods to remove interior 17.53/5.66 * elements, {@link #removeFirstOccurrence removeFirstOccurrence} and 17.53/5.66 * {@link #removeLastOccurrence removeLastOccurrence}. 17.53/5.66 * 17.53/5.66 *

Unlike the {@link List} interface, this interface does not 17.53/5.66 * provide support for indexed access to elements. 17.53/5.66 * 17.53/5.66 *

While Deque implementations are not strictly required 17.53/5.66 * to prohibit the insertion of null elements, they are strongly 17.53/5.66 * encouraged to do so. Users of any Deque implementations 17.53/5.66 * that do allow null elements are strongly encouraged not to 17.53/5.66 * take advantage of the ability to insert nulls. This is so because 17.53/5.66 * null is used as a special return value by various methods 17.53/5.66 * to indicated that the deque is empty. 17.53/5.66 * 17.53/5.66 *

Deque implementations generally do not define 17.53/5.66 * element-based versions of the equals and hashCode 17.53/5.66 * methods, but instead inherit the identity-based versions from class 17.53/5.66 * Object. 17.53/5.66 * 17.53/5.66 *

This interface is a member of the Java Collections 17.53/5.66 * Framework. 17.53/5.66 * 17.53/5.66 * @author Doug Lea 17.53/5.66 * @author Josh Bloch 17.53/5.66 * @since 1.6 17.53/5.66 * @param the type of elements held in this collection 17.53/5.66 */ 17.53/5.66 17.53/5.66 public interface Deque extends Queue { 17.53/5.66 /** 17.53/5.66 * Inserts the specified element at the front of this deque if it is 17.53/5.66 * possible to do so immediately without violating capacity restrictions. 17.53/5.66 * When using a capacity-restricted deque, it is generally preferable to 17.53/5.66 * use method {@link #offerFirst}. 17.53/5.66 * 17.53/5.66 * @param e the element to add 17.53/5.66 * @throws IllegalStateException if the element cannot be added at this 17.53/5.66 * time due to capacity restrictions 17.53/5.66 * @throws ClassCastException if the class of the specified element 17.53/5.66 * prevents it from being added to this deque 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * deque does not permit null elements 17.53/5.66 * @throws IllegalArgumentException if some property of the specified 17.53/5.66 * element prevents it from being added to this deque 17.53/5.66 */ 17.53/5.66 void addFirst(E e); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Inserts the specified element at the end of this deque if it is 17.53/5.66 * possible to do so immediately without violating capacity restrictions. 17.53/5.66 * When using a capacity-restricted deque, it is generally preferable to 17.53/5.66 * use method {@link #offerLast}. 17.53/5.66 * 17.53/5.66 *

This method is equivalent to {@link #add}. 17.53/5.66 * 17.53/5.66 * @param e the element to add 17.53/5.66 * @throws IllegalStateException if the element cannot be added at this 17.53/5.66 * time due to capacity restrictions 17.53/5.66 * @throws ClassCastException if the class of the specified element 17.53/5.66 * prevents it from being added to this deque 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * deque does not permit null elements 17.53/5.66 * @throws IllegalArgumentException if some property of the specified 17.53/5.66 * element prevents it from being added to this deque 17.53/5.66 */ 17.53/5.66 void addLast(E e); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Inserts the specified element at the front of this deque unless it would 17.53/5.66 * violate capacity restrictions. When using a capacity-restricted deque, 17.53/5.66 * this method is generally preferable to the {@link #addFirst} method, 17.53/5.66 * which can fail to insert an element only by throwing an exception. 17.53/5.66 * 17.53/5.66 * @param e the element to add 17.53/5.66 * @return true if the element was added to this deque, else 17.53/5.66 * false 17.53/5.66 * @throws ClassCastException if the class of the specified element 17.53/5.66 * prevents it from being added to this deque 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * deque does not permit null elements 17.53/5.66 * @throws IllegalArgumentException if some property of the specified 17.53/5.66 * element prevents it from being added to this deque 17.53/5.66 */ 17.53/5.66 boolean offerFirst(E e); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Inserts the specified element at the end of this deque unless it would 17.53/5.66 * violate capacity restrictions. When using a capacity-restricted deque, 17.53/5.66 * this method is generally preferable to the {@link #addLast} method, 17.53/5.66 * which can fail to insert an element only by throwing an exception. 17.53/5.66 * 17.53/5.66 * @param e the element to add 17.53/5.66 * @return true if the element was added to this deque, else 17.53/5.66 * false 17.53/5.66 * @throws ClassCastException if the class of the specified element 17.53/5.66 * prevents it from being added to this deque 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * deque does not permit null elements 17.53/5.66 * @throws IllegalArgumentException if some property of the specified 17.53/5.66 * element prevents it from being added to this deque 17.53/5.66 */ 17.53/5.66 boolean offerLast(E e); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves and removes the first element of this deque. This method 17.53/5.66 * differs from {@link #pollFirst pollFirst} only in that it throws an 17.53/5.66 * exception if this deque is empty. 17.53/5.66 * 17.53/5.66 * @return the head of this deque 17.53/5.66 * @throws NoSuchElementException if this deque is empty 17.53/5.66 */ 17.53/5.66 E removeFirst(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves and removes the last element of this deque. This method 17.53/5.66 * differs from {@link #pollLast pollLast} only in that it throws an 17.53/5.66 * exception if this deque is empty. 17.53/5.66 * 17.53/5.66 * @return the tail of this deque 17.53/5.66 * @throws NoSuchElementException if this deque is empty 17.53/5.66 */ 17.53/5.66 E removeLast(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves and removes the first element of this deque, 17.53/5.66 * or returns null if this deque is empty. 17.53/5.66 * 17.53/5.66 * @return the head of this deque, or null if this deque is empty 17.53/5.66 */ 17.53/5.66 E pollFirst(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves and removes the last element of this deque, 17.53/5.66 * or returns null if this deque is empty. 17.53/5.66 * 17.53/5.66 * @return the tail of this deque, or null if this deque is empty 17.53/5.66 */ 17.53/5.66 E pollLast(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves, but does not remove, the first element of this deque. 17.53/5.66 * 17.53/5.66 * This method differs from {@link #peekFirst peekFirst} only in that it 17.53/5.66 * throws an exception if this deque is empty. 17.53/5.66 * 17.53/5.66 * @return the head of this deque 17.53/5.66 * @throws NoSuchElementException if this deque is empty 17.53/5.66 */ 17.53/5.66 E getFirst(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves, but does not remove, the last element of this deque. 17.53/5.66 * This method differs from {@link #peekLast peekLast} only in that it 17.53/5.66 * throws an exception if this deque is empty. 17.53/5.66 * 17.53/5.66 * @return the tail of this deque 17.53/5.66 * @throws NoSuchElementException if this deque is empty 17.53/5.66 */ 17.53/5.66 E getLast(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves, but does not remove, the first element of this deque, 17.53/5.66 * or returns null if this deque is empty. 17.53/5.66 * 17.53/5.66 * @return the head of this deque, or null if this deque is empty 17.53/5.66 */ 17.53/5.66 E peekFirst(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves, but does not remove, the last element of this deque, 17.53/5.66 * or returns null if this deque is empty. 17.53/5.66 * 17.53/5.66 * @return the tail of this deque, or null if this deque is empty 17.53/5.66 */ 17.53/5.66 E peekLast(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Removes the first occurrence of the specified element from this deque. 17.53/5.66 * If the deque does not contain the element, it is unchanged. 17.53/5.66 * More formally, removes the first element e such that 17.53/5.66 * (o==null ? e==null : o.equals(e)) 17.53/5.66 * (if such an element exists). 17.53/5.66 * Returns true if this deque contained the specified element 17.53/5.66 * (or equivalently, if this deque changed as a result of the call). 17.53/5.66 * 17.53/5.66 * @param o element to be removed from this deque, if present 17.53/5.66 * @return true if an element was removed as a result of this call 17.53/5.66 * @throws ClassCastException if the class of the specified element 17.53/5.66 * is incompatible with this deque (optional) 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * deque does not permit null elements (optional) 17.53/5.66 */ 17.53/5.66 boolean removeFirstOccurrence(Object o); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Removes the last occurrence of the specified element from this deque. 17.53/5.66 * If the deque does not contain the element, it is unchanged. 17.53/5.66 * More formally, removes the last element e such that 17.53/5.66 * (o==null ? e==null : o.equals(e)) 17.53/5.66 * (if such an element exists). 17.53/5.66 * Returns true if this deque contained the specified element 17.53/5.66 * (or equivalently, if this deque changed as a result of the call). 17.53/5.66 * 17.53/5.66 * @param o element to be removed from this deque, if present 17.53/5.66 * @return true if an element was removed as a result of this call 17.53/5.66 * @throws ClassCastException if the class of the specified element 17.53/5.66 * is incompatible with this deque (optional) 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * deque does not permit null elements (optional) 17.53/5.66 */ 17.53/5.66 boolean removeLastOccurrence(Object o); 17.53/5.66 17.53/5.66 // *** Queue methods *** 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Inserts the specified element into the queue represented by this deque 17.53/5.66 * (in other words, at the tail of this deque) if it is possible to do so 17.53/5.66 * immediately without violating capacity restrictions, returning 17.53/5.66 * true upon success and throwing an 17.53/5.66 * IllegalStateException if no space is currently available. 17.53/5.66 * When using a capacity-restricted deque, it is generally preferable to 17.53/5.66 * use {@link #offer(Object) offer}. 17.53/5.66 * 17.53/5.66 *

This method is equivalent to {@link #addLast}. 17.53/5.66 * 17.53/5.66 * @param e the element to add 17.53/5.66 * @return true (as specified by {@link Collection#add}) 17.53/5.66 * @throws IllegalStateException if the element cannot be added at this 17.53/5.66 * time due to capacity restrictions 17.53/5.66 * @throws ClassCastException if the class of the specified element 17.53/5.66 * prevents it from being added to this deque 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * deque does not permit null elements 17.53/5.66 * @throws IllegalArgumentException if some property of the specified 17.53/5.66 * element prevents it from being added to this deque 17.53/5.66 */ 17.53/5.66 boolean add(E e); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Inserts the specified element into the queue represented by this deque 17.53/5.66 * (in other words, at the tail of this deque) if it is possible to do so 17.53/5.66 * immediately without violating capacity restrictions, returning 17.53/5.66 * true upon success and false if no space is currently 17.53/5.66 * available. When using a capacity-restricted deque, this method is 17.53/5.66 * generally preferable to the {@link #add} method, which can fail to 17.53/5.66 * insert an element only by throwing an exception. 17.53/5.66 * 17.53/5.66 *

This method is equivalent to {@link #offerLast}. 17.53/5.66 * 17.53/5.66 * @param e the element to add 17.53/5.66 * @return true if the element was added to this deque, else 17.53/5.66 * false 17.53/5.66 * @throws ClassCastException if the class of the specified element 17.53/5.66 * prevents it from being added to this deque 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * deque does not permit null elements 17.53/5.66 * @throws IllegalArgumentException if some property of the specified 17.53/5.66 * element prevents it from being added to this deque 17.53/5.66 */ 17.53/5.66 boolean offer(E e); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves and removes the head of the queue represented by this deque 17.53/5.66 * (in other words, the first element of this deque). 17.53/5.66 * This method differs from {@link #poll poll} only in that it throws an 17.53/5.66 * exception if this deque is empty. 17.53/5.66 * 17.53/5.66 *

This method is equivalent to {@link #removeFirst()}. 17.53/5.66 * 17.53/5.66 * @return the head of the queue represented by this deque 17.53/5.66 * @throws NoSuchElementException if this deque is empty 17.53/5.66 */ 17.53/5.66 E remove(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves and removes the head of the queue represented by this deque 17.53/5.66 * (in other words, the first element of this deque), or returns 17.53/5.66 * null if this deque is empty. 17.53/5.66 * 17.53/5.66 *

This method is equivalent to {@link #pollFirst()}. 17.53/5.66 * 17.53/5.66 * @return the first element of this deque, or null if 17.53/5.66 * this deque is empty 17.53/5.66 */ 17.53/5.66 E poll(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves, but does not remove, the head of the queue represented by 17.53/5.66 * this deque (in other words, the first element of this deque). 17.53/5.66 * This method differs from {@link #peek peek} only in that it throws an 17.53/5.66 * exception if this deque is empty. 17.53/5.66 * 17.53/5.66 *

This method is equivalent to {@link #getFirst()}. 17.53/5.66 * 17.53/5.66 * @return the head of the queue represented by this deque 17.53/5.66 * @throws NoSuchElementException if this deque is empty 17.53/5.66 */ 17.53/5.66 E element(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Retrieves, but does not remove, the head of the queue represented by 17.53/5.66 * this deque (in other words, the first element of this deque), or 17.53/5.66 * returns null if this deque is empty. 17.53/5.66 * 17.53/5.66 *

This method is equivalent to {@link #peekFirst()}. 17.53/5.66 * 17.53/5.66 * @return the head of the queue represented by this deque, or 17.53/5.66 * null if this deque is empty 17.53/5.66 */ 17.53/5.66 E peek(); 17.53/5.66 17.53/5.66 17.53/5.66 // *** Stack methods *** 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Pushes an element onto the stack represented by this deque (in other 17.53/5.66 * words, at the head of this deque) if it is possible to do so 17.53/5.66 * immediately without violating capacity restrictions, returning 17.53/5.66 * true upon success and throwing an 17.53/5.66 * IllegalStateException if no space is currently available. 17.53/5.66 * 17.53/5.66 *

This method is equivalent to {@link #addFirst}. 17.53/5.66 * 17.53/5.66 * @param e the element to push 17.53/5.66 * @throws IllegalStateException if the element cannot be added at this 17.53/5.66 * time due to capacity restrictions 17.53/5.66 * @throws ClassCastException if the class of the specified element 17.53/5.66 * prevents it from being added to this deque 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * deque does not permit null elements 17.53/5.66 * @throws IllegalArgumentException if some property of the specified 17.53/5.66 * element prevents it from being added to this deque 17.53/5.66 */ 17.53/5.66 void push(E e); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Pops an element from the stack represented by this deque. In other 17.53/5.66 * words, removes and returns the first element of this deque. 17.53/5.66 * 17.53/5.66 *

This method is equivalent to {@link #removeFirst()}. 17.53/5.66 * 17.53/5.66 * @return the element at the front of this deque (which is the top 17.53/5.66 * of the stack represented by this deque) 17.53/5.66 * @throws NoSuchElementException if this deque is empty 17.53/5.66 */ 17.53/5.66 E pop(); 17.53/5.66 17.53/5.66 17.53/5.66 // *** Collection methods *** 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Removes the first occurrence of the specified element from this deque. 17.53/5.66 * If the deque does not contain the element, it is unchanged. 17.53/5.66 * More formally, removes the first element e such that 17.53/5.66 * (o==null ? e==null : o.equals(e)) 17.53/5.66 * (if such an element exists). 17.53/5.66 * Returns true if this deque contained the specified element 17.53/5.66 * (or equivalently, if this deque changed as a result of the call). 17.53/5.66 * 17.53/5.66 *

This method is equivalent to {@link #removeFirstOccurrence}. 17.53/5.66 * 17.53/5.66 * @param o element to be removed from this deque, if present 17.53/5.66 * @return true if an element was removed as a result of this call 17.53/5.66 * @throws ClassCastException if the class of the specified element 17.53/5.66 * is incompatible with this deque (optional) 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * deque does not permit null elements (optional) 17.53/5.66 */ 17.53/5.66 boolean remove(Object o); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns true if this deque contains the specified element. 17.53/5.66 * More formally, returns true if and only if this deque contains 17.53/5.66 * at least one element e such that 17.53/5.66 * (o==null ? e==null : o.equals(e)). 17.53/5.66 * 17.53/5.66 * @param o element whose presence in this deque is to be tested 17.53/5.66 * @return true if this deque contains the specified element 17.53/5.66 * @throws ClassCastException if the type of the specified element 17.53/5.66 * is incompatible with this deque (optional) 17.53/5.66 * @throws NullPointerException if the specified element is null and this 17.53/5.66 * deque does not permit null elements (optional) 17.53/5.66 */ 17.53/5.66 boolean contains(Object o); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns the number of elements in this deque. 17.53/5.66 * 17.53/5.66 * @return the number of elements in this deque 17.53/5.66 */ 17.53/5.66 public int size(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns an iterator over the elements in this deque in proper sequence. 17.53/5.66 * The elements will be returned in order from first (head) to last (tail). 17.53/5.66 * 17.53/5.66 * @return an iterator over the elements in this deque in proper sequence 17.53/5.66 */ 17.53/5.66 Iterator iterator(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns an iterator over the elements in this deque in reverse 17.53/5.66 * sequential order. The elements will be returned in order from 17.53/5.66 * last (tail) to first (head). 17.53/5.66 * 17.53/5.66 * @return an iterator over the elements in this deque in reverse 17.53/5.66 * sequence 17.53/5.66 */ 17.53/5.66 Iterator descendingIterator(); 17.53/5.66 17.53/5.66 } 17.53/5.66 17.53/5.66 17.53/5.66 /* 17.53/5.66 * Copyright 1994-2003 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.66 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.66 * 17.53/5.66 * This code is free software; you can redistribute it and/or modify it 17.53/5.66 * under the terms of the GNU General Public License version 2 only, as 17.53/5.66 * published by the Free Software Foundation. Sun designates this 17.53/5.66 * particular file as subject to the "Classpath" exception as provided 17.53/5.66 * by Sun in the LICENSE file that accompanied this code. 17.53/5.66 * 17.53/5.66 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.66 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.66 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.66 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.66 * accompanied this code). 17.53/5.66 * 17.53/5.66 * You should have received a copy of the GNU General Public License version 17.53/5.66 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.66 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.66 * 17.53/5.66 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.66 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.66 * have any questions. 17.53/5.66 */ 17.53/5.66 17.53/5.66 package javaUtilEx; 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Thrown to indicate that a method has been passed an illegal or 17.53/5.66 * inappropriate argument. 17.53/5.66 * 17.53/5.66 * @author unascribed 17.53/5.66 * @see java.lang.Thread#setPriority(int) 17.53/5.66 * @since JDK1.0 17.53/5.66 */ 17.53/5.66 public 17.53/5.66 class IllegalArgumentException extends RuntimeException { 17.53/5.66 /** 17.53/5.66 * Constructs an IllegalArgumentException with no 17.53/5.66 * detail message. 17.53/5.66 */ 17.53/5.66 public IllegalArgumentException() { 17.53/5.66 super(); 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Constructs an IllegalArgumentException with the 17.53/5.66 * specified detail message. 17.53/5.66 * 17.53/5.66 * @param s the detail message. 17.53/5.66 */ 17.53/5.66 public IllegalArgumentException(String s) { 17.53/5.66 super(s); 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Constructs a new exception with the specified detail message and 17.53/5.66 * cause. 17.53/5.66 * 17.53/5.66 *

Note that the detail message associated with cause is 17.53/5.66 * not automatically incorporated in this exception's detail 17.53/5.66 * message. 17.53/5.66 * 17.53/5.66 * @param message the detail message (which is saved for later retrieval 17.53/5.66 * by the {@link Throwable#getMessage()} method). 17.53/5.66 * @param cause the cause (which is saved for later retrieval by the 17.53/5.66 * {@link Throwable#getCause()} method). (A null value 17.53/5.66 * is permitted, and indicates that the cause is nonexistent or 17.53/5.66 * unknown.) 17.53/5.66 * @since 1.5 17.53/5.66 */ 17.53/5.66 public IllegalArgumentException(String message, Throwable cause) { 17.53/5.66 super(message, cause); 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Constructs a new exception with the specified cause and a detail 17.53/5.66 * message of (cause==null ? null : cause.toString()) (which 17.53/5.66 * typically contains the class and detail message of cause). 17.53/5.66 * This constructor is useful for exceptions that are little more than 17.53/5.66 * wrappers for other throwables (for example, {@link 17.53/5.66 * java.security.PrivilegedActionException}). 17.53/5.66 * 17.53/5.66 * @param cause the cause (which is saved for later retrieval by the 17.53/5.66 * {@link Throwable#getCause()} method). (A null value is 17.53/5.66 * permitted, and indicates that the cause is nonexistent or 17.53/5.66 * unknown.) 17.53/5.66 * @since 1.5 17.53/5.66 */ 17.53/5.66 public IllegalArgumentException(Throwable cause) { 17.53/5.66 super(cause); 17.53/5.66 } 17.53/5.66 17.53/5.66 private static final long serialVersionUID = -5365630128856068164L; 17.53/5.66 } 17.53/5.66 17.53/5.66 17.53/5.66 /* 17.53/5.66 * Copyright 1996-2003 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.66 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.66 * 17.53/5.66 * This code is free software; you can redistribute it and/or modify it 17.53/5.66 * under the terms of the GNU General Public License version 2 only, as 17.53/5.66 * published by the Free Software Foundation. Sun designates this 17.53/5.66 * particular file as subject to the "Classpath" exception as provided 17.53/5.66 * by Sun in the LICENSE file that accompanied this code. 17.53/5.66 * 17.53/5.66 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.66 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.66 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.66 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.66 * accompanied this code). 17.53/5.66 * 17.53/5.66 * You should have received a copy of the GNU General Public License version 17.53/5.66 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.66 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.66 * 17.53/5.66 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.66 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.66 * have any questions. 17.53/5.66 */ 17.53/5.66 17.53/5.66 package javaUtilEx; 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Signals that a method has been invoked at an illegal or 17.53/5.66 * inappropriate time. In other words, the Java environment or 17.53/5.66 * Java application is not in an appropriate state for the requested 17.53/5.66 * operation. 17.53/5.66 * 17.53/5.66 * @author Jonni Kanerva 17.53/5.66 * @since JDK1.1 17.53/5.66 */ 17.53/5.66 public 17.53/5.66 class IllegalStateException extends RuntimeException { 17.53/5.66 /** 17.53/5.66 * Constructs an IllegalStateException with no detail message. 17.53/5.66 * A detail message is a String that describes this particular exception. 17.53/5.66 */ 17.53/5.66 public IllegalStateException() { 17.53/5.66 super(); 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Constructs an IllegalStateException with the specified detail 17.53/5.66 * message. A detail message is a String that describes this particular 17.53/5.66 * exception. 17.53/5.66 * 17.53/5.66 * @param s the String that contains a detailed message 17.53/5.66 */ 17.53/5.66 public IllegalStateException(String s) { 17.53/5.66 super(s); 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Constructs a new exception with the specified detail message and 17.53/5.66 * cause. 17.53/5.66 * 17.53/5.66 *

Note that the detail message associated with cause is 17.53/5.66 * not automatically incorporated in this exception's detail 17.53/5.66 * message. 17.53/5.66 * 17.53/5.66 * @param message the detail message (which is saved for later retrieval 17.53/5.66 * by the {@link Throwable#getMessage()} method). 17.53/5.66 * @param cause the cause (which is saved for later retrieval by the 17.53/5.66 * {@link Throwable#getCause()} method). (A null value 17.53/5.66 * is permitted, and indicates that the cause is nonexistent or 17.53/5.66 * unknown.) 17.53/5.66 * @since 1.5 17.53/5.66 */ 17.53/5.66 public IllegalStateException(String message, Throwable cause) { 17.53/5.66 super(message, cause); 17.53/5.66 } 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Constructs a new exception with the specified cause and a detail 17.53/5.66 * message of (cause==null ? null : cause.toString()) (which 17.53/5.66 * typically contains the class and detail message of cause). 17.53/5.66 * This constructor is useful for exceptions that are little more than 17.53/5.66 * wrappers for other throwables (for example, {@link 17.53/5.66 * java.security.PrivilegedActionException}). 17.53/5.66 * 17.53/5.66 * @param cause the cause (which is saved for later retrieval by the 17.53/5.66 * {@link Throwable#getCause()} method). (A null value is 17.53/5.66 * permitted, and indicates that the cause is nonexistent or 17.53/5.66 * unknown.) 17.53/5.66 * @since 1.5 17.53/5.66 */ 17.53/5.66 public IllegalStateException(Throwable cause) { 17.53/5.66 super(cause); 17.53/5.66 } 17.53/5.66 17.53/5.66 static final long serialVersionUID = -1848914673093119416L; 17.53/5.66 } 17.53/5.66 17.53/5.66 17.53/5.66 /* 17.53/5.66 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.66 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.66 * 17.53/5.66 * This code is free software; you can redistribute it and/or modify it 17.53/5.66 * under the terms of the GNU General Public License version 2 only, as 17.53/5.66 * published by the Free Software Foundation. Sun designates this 17.53/5.66 * particular file as subject to the "Classpath" exception as provided 17.53/5.66 * by Sun in the LICENSE file that accompanied this code. 17.53/5.66 * 17.53/5.66 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.66 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.66 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.66 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.66 * accompanied this code). 17.53/5.66 * 17.53/5.66 * You should have received a copy of the GNU General Public License version 17.53/5.66 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.66 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.66 * 17.53/5.66 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.66 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.66 * have any questions. 17.53/5.66 */ 17.53/5.66 17.53/5.66 package javaUtilEx; 17.53/5.66 17.53/5.66 /** 17.53/5.66 * An iterator over a collection. {@code Iterator} takes the place of 17.53/5.66 * {@link Enumeration} in the Java Collections Framework. Iterators 17.53/5.66 * differ from enumerations in two ways: 17.53/5.66 * 17.53/5.66 *

17.53/5.66 * 17.53/5.66 *

This interface is a member of the 17.53/5.66 * 17.53/5.66 * Java Collections Framework. 17.53/5.66 * 17.53/5.66 * @author Josh Bloch 17.53/5.66 * @see Collection 17.53/5.66 * @see ListIterator 17.53/5.66 * @see Iterable 17.53/5.66 * @since 1.2 17.53/5.66 */ 17.53/5.66 public interface Iterator { 17.53/5.66 /** 17.53/5.66 * Returns {@code true} if the iteration has more elements. 17.53/5.66 * (In other words, returns {@code true} if {@link #next} would 17.53/5.66 * return an element rather than throwing an exception.) 17.53/5.66 * 17.53/5.66 * @return {@code true} if the iteration has more elements 17.53/5.66 */ 17.53/5.66 boolean hasNext(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Returns the next element in the iteration. 17.53/5.66 * 17.53/5.66 * @return the next element in the iteration 17.53/5.66 * @throws NoSuchElementException if the iteration has no more elements 17.53/5.66 */ 17.53/5.66 E next(); 17.53/5.66 17.53/5.66 /** 17.53/5.66 * Removes from the underlying collection the last element returned 17.53/5.66 * by this iterator (optional operation). This method can be called 17.53/5.66 * only once per call to {@link #next}. The behavior of an iterator 17.53/5.66 * is unspecified if the underlying collection is modified while the 17.53/5.66 * iteration is in progress in any way other than by calling this 17.53/5.66 * method. 17.53/5.66 * 17.53/5.66 * @throws UnsupportedOperationException if the {@code remove} 17.53/5.66 * operation is not supported by this iterator 17.53/5.66 * 17.53/5.66 * @throws IllegalStateException if the {@code next} method has not 17.53/5.66 * yet been called, or the {@code remove} method has already 17.53/5.66 * been called after the last call to the {@code next} 17.53/5.66 * method 17.53/5.66 */ 17.53/5.66 void remove(); 17.53/5.66 } 17.53/5.66 17.53/5.66 17.53/5.66 package javaUtilEx; 17.53/5.66 17.53/5.66 public class juLinkedListCreateRemoveLast { 17.53/5.66 public static void main(String[] args) { 17.53/5.66 Random.args = args; 17.53/5.66 17.53/5.66 LinkedList l = createList(Random.random()); 17.53/5.66 l.removeLast(); 17.53/5.66 } 17.53/5.66 17.53/5.66 public static LinkedList createList(int n) { 17.53/5.66 LinkedList l = new LinkedList(); 17.53/5.66 while (n > 0) { 17.53/5.66 l.addLast(new Content(Random.random())); 17.53/5.66 n--; 17.53/5.66 } 17.53/5.66 return l; 17.53/5.66 } 17.53/5.66 } 17.53/5.66 17.53/5.66 final class Content { 17.53/5.66 int val; 17.53/5.66 17.53/5.66 public Content(int v) { 17.53/5.66 this.val = v; 17.53/5.66 } 17.53/5.66 17.53/5.66 public int hashCode() { 17.53/5.66 return val^31; 17.53/5.66 } 17.53/5.66 17.53/5.66 public boolean equals(Object o) { 17.53/5.67 if (o instanceof Content) { 17.53/5.67 return this.val == ((Content) o).val; 17.53/5.67 } 17.53/5.67 return false; 17.53/5.67 } 17.53/5.67 } 17.53/5.67 17.53/5.67 17.53/5.67 /* 17.53/5.67 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.67 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.67 * 17.53/5.67 * This code is free software; you can redistribute it and/or modify it 17.53/5.67 * under the terms of the GNU General Public License version 2 only, as 17.53/5.67 * published by the Free Software Foundation. Sun designates this 17.53/5.67 * particular file as subject to the "Classpath" exception as provided 17.53/5.67 * by Sun in the LICENSE file that accompanied this code. 17.53/5.67 * 17.53/5.67 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.67 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.67 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.67 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.67 * accompanied this code). 17.53/5.67 * 17.53/5.67 * You should have received a copy of the GNU General Public License version 17.53/5.67 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.67 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.67 * 17.53/5.67 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.67 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.67 * have any questions. 17.53/5.67 */ 17.53/5.67 17.53/5.67 package javaUtilEx; 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Linked list implementation of the List interface. Implements all 17.53/5.67 * optional list operations, and permits all elements (including 17.53/5.67 * null). In addition to implementing the List interface, 17.53/5.67 * the LinkedList class provides uniformly named methods to 17.53/5.67 * get, remove and insert an element at the 17.53/5.67 * beginning and end of the list. These operations allow linked lists to be 17.53/5.67 * used as a stack, {@linkplain Queue queue}, or {@linkplain Deque 17.53/5.67 * double-ended queue}.

17.53/5.67 * 17.53/5.67 * The class implements the Deque interface, providing 17.53/5.67 * first-in-first-out queue operations for add, 17.53/5.67 * poll, along with other stack and deque operations.

17.53/5.67 * 17.53/5.67 * All of the operations perform as could be expected for a doubly-linked 17.53/5.67 * list. Operations that index into the list will traverse the list from 17.53/5.67 * the beginning or the end, whichever is closer to the specified index.

17.53/5.67 * 17.53/5.67 *

Note that this implementation is not synchronized. 17.53/5.67 * If multiple threads access a linked list concurrently, and at least 17.53/5.67 * one of the threads modifies the list structurally, it must be 17.53/5.67 * synchronized externally. (A structural modification is any operation 17.53/5.67 * that adds or deletes one or more elements; merely setting the value of 17.53/5.67 * an element is not a structural modification.) This is typically 17.53/5.67 * accomplished by synchronizing on some object that naturally 17.53/5.67 * encapsulates the list. 17.53/5.67 * 17.53/5.67 * If no such object exists, the list should be "wrapped" using the 17.53/5.67 * {@link Collections#synchronizedList Collections.synchronizedList} 17.53/5.67 * method. This is best done at creation time, to prevent accidental 17.53/5.67 * unsynchronized access to the list:

17.53/5.67	 *   List list = Collections.synchronizedList(new LinkedList(...));
17.53/5.67 * 17.53/5.67 *

The iterators returned by this class's iterator and 17.53/5.67 * listIterator methods are fail-fast: if the list is 17.53/5.67 * structurally modified at any time after the iterator is created, in 17.53/5.67 * any way except through the Iterator's own remove or 17.53/5.67 * add methods, the iterator will throw a {@link 17.53/5.67 * ConcurrentModificationException}. Thus, in the face of concurrent 17.53/5.67 * modification, the iterator fails quickly and cleanly, rather than 17.53/5.67 * risking arbitrary, non-deterministic behavior at an undetermined 17.53/5.67 * time in the future. 17.53/5.67 * 17.53/5.67 *

Note that the fail-fast behavior of an iterator cannot be guaranteed 17.53/5.67 * as it is, generally speaking, impossible to make any hard guarantees in the 17.53/5.67 * presence of unsynchronized concurrent modification. Fail-fast iterators 17.53/5.67 * throw ConcurrentModificationException on a best-effort basis. 17.53/5.67 * Therefore, it would be wrong to write a program that depended on this 17.53/5.67 * exception for its correctness: the fail-fast behavior of iterators 17.53/5.67 * should be used only to detect bugs. 17.53/5.67 * 17.53/5.67 *

This class is a member of the 17.53/5.67 * 17.53/5.67 * Java Collections Framework. 17.53/5.67 * 17.53/5.67 * @author Josh Bloch 17.53/5.67 * @see List 17.53/5.67 * @see ArrayList 17.53/5.67 * @see Vector 17.53/5.67 * @since 1.2 17.53/5.67 * @param the type of elements held in this collection 17.53/5.67 */ 17.53/5.67 17.53/5.67 public class LinkedList 17.53/5.67 extends AbstractSequentialList 17.53/5.67 implements List, Deque 17.53/5.67 { 17.53/5.67 private transient Entry header = new Entry(null, null, null); 17.53/5.67 private transient int size = 0; 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Constructs an empty list. 17.53/5.67 */ 17.53/5.67 public LinkedList() { 17.53/5.67 header.next = header.previous = header; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Constructs a list containing the elements of the specified 17.53/5.67 * collection, in the order they are returned by the collection's 17.53/5.67 * iterator. 17.53/5.67 * 17.53/5.67 * @param c the collection whose elements are to be placed into this list 17.53/5.67 * @throws NullPointerException if the specified collection is null 17.53/5.67 */ 17.53/5.67 public LinkedList(Collection c) { 17.53/5.67 this(); 17.53/5.67 addAll(c); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the first element in this list. 17.53/5.67 * 17.53/5.67 * @return the first element in this list 17.53/5.67 * @throws NoSuchElementException if this list is empty 17.53/5.67 */ 17.53/5.67 public E getFirst() { 17.53/5.67 if (size==0) 17.53/5.67 throw new NoSuchElementException(); 17.53/5.67 17.53/5.67 return header.next.element; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the last element in this list. 17.53/5.67 * 17.53/5.67 * @return the last element in this list 17.53/5.67 * @throws NoSuchElementException if this list is empty 17.53/5.67 */ 17.53/5.67 public E getLast() { 17.53/5.67 if (size==0) 17.53/5.67 throw new NoSuchElementException(); 17.53/5.67 17.53/5.67 return header.previous.element; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Removes and returns the first element from this list. 17.53/5.67 * 17.53/5.67 * @return the first element from this list 17.53/5.67 * @throws NoSuchElementException if this list is empty 17.53/5.67 */ 17.53/5.67 public E removeFirst() { 17.53/5.67 return remove(header.next); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Removes and returns the last element from this list. 17.53/5.67 * 17.53/5.67 * @return the last element from this list 17.53/5.67 * @throws NoSuchElementException if this list is empty 17.53/5.67 */ 17.53/5.67 public E removeLast() { 17.53/5.67 return remove(header.previous); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Inserts the specified element at the beginning of this list. 17.53/5.67 * 17.53/5.67 * @param e the element to add 17.53/5.67 */ 17.53/5.67 public void addFirst(E e) { 17.53/5.67 addBefore(e, header.next); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Appends the specified element to the end of this list. 17.53/5.67 * 17.53/5.67 *

This method is equivalent to {@link #add}. 17.53/5.67 * 17.53/5.67 * @param e the element to add 17.53/5.67 */ 17.53/5.67 public void addLast(E e) { 17.53/5.67 addBefore(e, header); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns true if this list contains the specified element. 17.53/5.67 * More formally, returns true if and only if this list contains 17.53/5.67 * at least one element e such that 17.53/5.67 * (o==null ? e==null : o.equals(e)). 17.53/5.67 * 17.53/5.67 * @param o element whose presence in this list is to be tested 17.53/5.67 * @return true if this list contains the specified element 17.53/5.67 */ 17.53/5.67 public boolean contains(Object o) { 17.53/5.67 return indexOf(o) != -1; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the number of elements in this list. 17.53/5.67 * 17.53/5.67 * @return the number of elements in this list 17.53/5.67 */ 17.53/5.67 public int size() { 17.53/5.67 return size; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Appends the specified element to the end of this list. 17.53/5.67 * 17.53/5.67 *

This method is equivalent to {@link #addLast}. 17.53/5.67 * 17.53/5.67 * @param e element to be appended to this list 17.53/5.67 * @return true (as specified by {@link Collection#add}) 17.53/5.67 */ 17.53/5.67 public boolean add(E e) { 17.53/5.67 addBefore(e, header); 17.53/5.67 return true; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Removes the first occurrence of the specified element from this list, 17.53/5.67 * if it is present. If this list does not contain the element, it is 17.53/5.67 * unchanged. More formally, removes the element with the lowest index 17.53/5.67 * i such that 17.53/5.67 * (o==null ? get(i)==null : o.equals(get(i))) 17.53/5.67 * (if such an element exists). Returns true if this list 17.53/5.67 * contained the specified element (or equivalently, if this list 17.53/5.67 * changed as a result of the call). 17.53/5.67 * 17.53/5.67 * @param o element to be removed from this list, if present 17.53/5.67 * @return true if this list contained the specified element 17.53/5.67 */ 17.53/5.67 public boolean remove(Object o) { 17.53/5.67 if (o==null) { 17.53/5.67 for (Entry e = header.next; e != header; e = e.next) { 17.53/5.67 if (e.element==null) { 17.53/5.67 remove(e); 17.53/5.67 return true; 17.53/5.67 } 17.53/5.67 } 17.53/5.67 } else { 17.53/5.67 for (Entry e = header.next; e != header; e = e.next) { 17.53/5.67 if (o.equals(e.element)) { 17.53/5.67 remove(e); 17.53/5.67 return true; 17.53/5.67 } 17.53/5.67 } 17.53/5.67 } 17.53/5.67 return false; 17.53/5.67 } 17.53/5.67 /** 17.53/5.67 * Removes all of the elements from this list. 17.53/5.67 */ 17.53/5.67 public void clear() { 17.53/5.67 Entry e = header.next; 17.53/5.67 while (e != header) { 17.53/5.67 Entry next = e.next; 17.53/5.67 e.next = e.previous = null; 17.53/5.67 e.element = null; 17.53/5.67 e = next; 17.53/5.67 } 17.53/5.67 header.next = header.previous = header; 17.53/5.67 size = 0; 17.53/5.67 modCount++; 17.53/5.67 } 17.53/5.67 17.53/5.67 17.53/5.67 // Positional Access Operations 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the element at the specified position in this list. 17.53/5.67 * 17.53/5.67 * @param index index of the element to return 17.53/5.67 * @return the element at the specified position in this list 17.53/5.67 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.67 */ 17.53/5.67 public E get(int index) { 17.53/5.67 return entry(index).element; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Replaces the element at the specified position in this list with the 17.53/5.67 * specified element. 17.53/5.67 * 17.53/5.67 * @param index index of the element to replace 17.53/5.67 * @param element element to be stored at the specified position 17.53/5.67 * @return the element previously at the specified position 17.53/5.67 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.67 */ 17.53/5.67 public E set(int index, E element) { 17.53/5.67 Entry e = entry(index); 17.53/5.67 E oldVal = e.element; 17.53/5.67 e.element = element; 17.53/5.67 return oldVal; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Inserts the specified element at the specified position in this list. 17.53/5.67 * Shifts the element currently at that position (if any) and any 17.53/5.67 * subsequent elements to the right (adds one to their indices). 17.53/5.67 * 17.53/5.67 * @param index index at which the specified element is to be inserted 17.53/5.67 * @param element element to be inserted 17.53/5.67 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.67 */ 17.53/5.67 public void add(int index, E element) { 17.53/5.67 addBefore(element, (index==size ? header : entry(index))); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Removes the element at the specified position in this list. Shifts any 17.53/5.67 * subsequent elements to the left (subtracts one from their indices). 17.53/5.67 * Returns the element that was removed from the list. 17.53/5.67 * 17.53/5.67 * @param index the index of the element to be removed 17.53/5.67 * @return the element previously at the specified position 17.53/5.67 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.67 */ 17.53/5.67 public E remove(int index) { 17.53/5.67 return remove(entry(index)); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the indexed entry. 17.53/5.67 */ 17.53/5.67 private Entry entry(int index) { 17.53/5.67 if (index < 0 || index >= size) 17.53/5.67 throw new IndexOutOfBoundsException(); 17.53/5.67 Entry e = header; 17.53/5.67 if (index < (size >> 1)) { 17.53/5.67 for (int i = 0; i <= index; i++) 17.53/5.67 e = e.next; 17.53/5.67 } else { 17.53/5.67 for (int i = size; i > index; i--) 17.53/5.67 e = e.previous; 17.53/5.67 } 17.53/5.67 return e; 17.53/5.67 } 17.53/5.67 17.53/5.67 17.53/5.67 // Search Operations 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the index of the first occurrence of the specified element 17.53/5.67 * in this list, or -1 if this list does not contain the element. 17.53/5.67 * More formally, returns the lowest index i such that 17.53/5.67 * (o==null ? get(i)==null : o.equals(get(i))), 17.53/5.67 * or -1 if there is no such index. 17.53/5.67 * 17.53/5.67 * @param o element to search for 17.53/5.67 * @return the index of the first occurrence of the specified element in 17.53/5.67 * this list, or -1 if this list does not contain the element 17.53/5.67 */ 17.53/5.67 public int indexOf(Object o) { 17.53/5.67 int index = 0; 17.53/5.67 if (o==null) { 17.53/5.67 for (Entry e = header.next; e != header; e = e.next) { 17.53/5.67 if (e.element==null) 17.53/5.67 return index; 17.53/5.67 index++; 17.53/5.67 } 17.53/5.67 } else { 17.53/5.67 for (Entry e = header.next; e != header; e = e.next) { 17.53/5.67 if (o.equals(e.element)) 17.53/5.67 return index; 17.53/5.67 index++; 17.53/5.67 } 17.53/5.67 } 17.53/5.67 return -1; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the index of the last occurrence of the specified element 17.53/5.67 * in this list, or -1 if this list does not contain the element. 17.53/5.67 * More formally, returns the highest index i such that 17.53/5.67 * (o==null ? get(i)==null : o.equals(get(i))), 17.53/5.67 * or -1 if there is no such index. 17.53/5.67 * 17.53/5.67 * @param o element to search for 17.53/5.67 * @return the index of the last occurrence of the specified element in 17.53/5.67 * this list, or -1 if this list does not contain the element 17.53/5.67 */ 17.53/5.67 public int lastIndexOf(Object o) { 17.53/5.67 int index = size; 17.53/5.67 if (o==null) { 17.53/5.67 for (Entry e = header.previous; e != header; e = e.previous) { 17.53/5.67 index--; 17.53/5.67 if (e.element==null) 17.53/5.67 return index; 17.53/5.67 } 17.53/5.67 } else { 17.53/5.67 for (Entry e = header.previous; e != header; e = e.previous) { 17.53/5.67 index--; 17.53/5.67 if (o.equals(e.element)) 17.53/5.67 return index; 17.53/5.67 } 17.53/5.67 } 17.53/5.67 return -1; 17.53/5.67 } 17.53/5.67 17.53/5.67 // Queue operations. 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves, but does not remove, the head (first element) of this list. 17.53/5.67 * @return the head of this list, or null if this list is empty 17.53/5.67 * @since 1.5 17.53/5.67 */ 17.53/5.67 public E peek() { 17.53/5.67 if (size==0) 17.53/5.67 return null; 17.53/5.67 return getFirst(); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves, but does not remove, the head (first element) of this list. 17.53/5.67 * @return the head of this list 17.53/5.67 * @throws NoSuchElementException if this list is empty 17.53/5.67 * @since 1.5 17.53/5.67 */ 17.53/5.67 public E element() { 17.53/5.67 return getFirst(); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves and removes the head (first element) of this list 17.53/5.67 * @return the head of this list, or null if this list is empty 17.53/5.67 * @since 1.5 17.53/5.67 */ 17.53/5.67 public E poll() { 17.53/5.67 if (size==0) 17.53/5.67 return null; 17.53/5.67 return removeFirst(); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves and removes the head (first element) of this list. 17.53/5.67 * 17.53/5.67 * @return the head of this list 17.53/5.67 * @throws NoSuchElementException if this list is empty 17.53/5.67 * @since 1.5 17.53/5.67 */ 17.53/5.67 public E remove() { 17.53/5.67 return removeFirst(); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Adds the specified element as the tail (last element) of this list. 17.53/5.67 * 17.53/5.67 * @param e the element to add 17.53/5.67 * @return true (as specified by {@link Queue#offer}) 17.53/5.67 * @since 1.5 17.53/5.67 */ 17.53/5.67 public boolean offer(E e) { 17.53/5.67 return add(e); 17.53/5.67 } 17.53/5.67 17.53/5.67 // Deque operations 17.53/5.67 /** 17.53/5.67 * Inserts the specified element at the front of this list. 17.53/5.67 * 17.53/5.67 * @param e the element to insert 17.53/5.67 * @return true (as specified by {@link Deque#offerFirst}) 17.53/5.67 * @since 1.6 17.53/5.67 */ 17.53/5.67 public boolean offerFirst(E e) { 17.53/5.67 addFirst(e); 17.53/5.67 return true; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Inserts the specified element at the end of this list. 17.53/5.67 * 17.53/5.67 * @param e the element to insert 17.53/5.67 * @return true (as specified by {@link Deque#offerLast}) 17.53/5.67 * @since 1.6 17.53/5.67 */ 17.53/5.67 public boolean offerLast(E e) { 17.53/5.67 addLast(e); 17.53/5.67 return true; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves, but does not remove, the first element of this list, 17.53/5.67 * or returns null if this list is empty. 17.53/5.67 * 17.53/5.67 * @return the first element of this list, or null 17.53/5.67 * if this list is empty 17.53/5.67 * @since 1.6 17.53/5.67 */ 17.53/5.67 public E peekFirst() { 17.53/5.67 if (size==0) 17.53/5.67 return null; 17.53/5.67 return getFirst(); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves, but does not remove, the last element of this list, 17.53/5.67 * or returns null if this list is empty. 17.53/5.67 * 17.53/5.67 * @return the last element of this list, or null 17.53/5.67 * if this list is empty 17.53/5.67 * @since 1.6 17.53/5.67 */ 17.53/5.67 public E peekLast() { 17.53/5.67 if (size==0) 17.53/5.67 return null; 17.53/5.67 return getLast(); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves and removes the first element of this list, 17.53/5.67 * or returns null if this list is empty. 17.53/5.67 * 17.53/5.67 * @return the first element of this list, or null if 17.53/5.67 * this list is empty 17.53/5.67 * @since 1.6 17.53/5.67 */ 17.53/5.67 public E pollFirst() { 17.53/5.67 if (size==0) 17.53/5.67 return null; 17.53/5.67 return removeFirst(); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves and removes the last element of this list, 17.53/5.67 * or returns null if this list is empty. 17.53/5.67 * 17.53/5.67 * @return the last element of this list, or null if 17.53/5.67 * this list is empty 17.53/5.67 * @since 1.6 17.53/5.67 */ 17.53/5.67 public E pollLast() { 17.53/5.67 if (size==0) 17.53/5.67 return null; 17.53/5.67 return removeLast(); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Pushes an element onto the stack represented by this list. In other 17.53/5.67 * words, inserts the element at the front of this list. 17.53/5.67 * 17.53/5.67 *

This method is equivalent to {@link #addFirst}. 17.53/5.67 * 17.53/5.67 * @param e the element to push 17.53/5.67 * @since 1.6 17.53/5.67 */ 17.53/5.67 public void push(E e) { 17.53/5.67 addFirst(e); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Pops an element from the stack represented by this list. In other 17.53/5.67 * words, removes and returns the first element of this list. 17.53/5.67 * 17.53/5.67 *

This method is equivalent to {@link #removeFirst()}. 17.53/5.67 * 17.53/5.67 * @return the element at the front of this list (which is the top 17.53/5.67 * of the stack represented by this list) 17.53/5.67 * @throws NoSuchElementException if this list is empty 17.53/5.67 * @since 1.6 17.53/5.67 */ 17.53/5.67 public E pop() { 17.53/5.67 return removeFirst(); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Removes the first occurrence of the specified element in this 17.53/5.67 * list (when traversing the list from head to tail). If the list 17.53/5.67 * does not contain the element, it is unchanged. 17.53/5.67 * 17.53/5.67 * @param o element to be removed from this list, if present 17.53/5.67 * @return true if the list contained the specified element 17.53/5.67 * @since 1.6 17.53/5.67 */ 17.53/5.67 public boolean removeFirstOccurrence(Object o) { 17.53/5.67 return remove(o); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Removes the last occurrence of the specified element in this 17.53/5.67 * list (when traversing the list from head to tail). If the list 17.53/5.67 * does not contain the element, it is unchanged. 17.53/5.67 * 17.53/5.67 * @param o element to be removed from this list, if present 17.53/5.67 * @return true if the list contained the specified element 17.53/5.67 * @since 1.6 17.53/5.67 */ 17.53/5.67 public boolean removeLastOccurrence(Object o) { 17.53/5.67 if (o==null) { 17.53/5.67 for (Entry e = header.previous; e != header; e = e.previous) { 17.53/5.67 if (e.element==null) { 17.53/5.67 remove(e); 17.53/5.67 return true; 17.53/5.67 } 17.53/5.67 } 17.53/5.67 } else { 17.53/5.67 for (Entry e = header.previous; e != header; e = e.previous) { 17.53/5.67 if (o.equals(e.element)) { 17.53/5.67 remove(e); 17.53/5.67 return true; 17.53/5.67 } 17.53/5.67 } 17.53/5.67 } 17.53/5.67 return false; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns a list-iterator of the elements in this list (in proper 17.53/5.67 * sequence), starting at the specified position in the list. 17.53/5.67 * Obeys the general contract of List.listIterator(int).

17.53/5.67 * 17.53/5.67 * The list-iterator is fail-fast: if the list is structurally 17.53/5.67 * modified at any time after the Iterator is created, in any way except 17.53/5.67 * through the list-iterator's own remove or add 17.53/5.67 * methods, the list-iterator will throw a 17.53/5.67 * ConcurrentModificationException. Thus, in the face of 17.53/5.67 * concurrent modification, the iterator fails quickly and cleanly, rather 17.53/5.67 * than risking arbitrary, non-deterministic behavior at an undetermined 17.53/5.67 * time in the future. 17.53/5.67 * 17.53/5.67 * @param index index of the first element to be returned from the 17.53/5.67 * list-iterator (by a call to next) 17.53/5.67 * @return a ListIterator of the elements in this list (in proper 17.53/5.67 * sequence), starting at the specified position in the list 17.53/5.67 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.67 * @see List#listIterator(int) 17.53/5.67 */ 17.53/5.67 public ListIterator listIterator(int index) { 17.53/5.67 return new ListItr(index); 17.53/5.67 } 17.53/5.67 17.53/5.67 private class ListItr implements ListIterator { 17.53/5.67 private Entry lastReturned = header; 17.53/5.67 private Entry next; 17.53/5.67 private int nextIndex; 17.53/5.67 private int expectedModCount = modCount; 17.53/5.67 17.53/5.67 ListItr(int index) { 17.53/5.67 if (index < 0 || index > size) 17.53/5.67 throw new IndexOutOfBoundsException(); 17.53/5.67 if (index < (size >> 1)) { 17.53/5.67 next = header.next; 17.53/5.67 for (nextIndex=0; nextIndexindex; nextIndex--) 17.53/5.67 next = next.previous; 17.53/5.67 } 17.53/5.67 } 17.53/5.67 17.53/5.67 public boolean hasNext() { 17.53/5.67 return nextIndex != size; 17.53/5.67 } 17.53/5.67 17.53/5.67 public E next() { 17.53/5.67 checkForComodification(); 17.53/5.67 if (nextIndex == size) 17.53/5.67 throw new NoSuchElementException(); 17.53/5.67 17.53/5.67 lastReturned = next; 17.53/5.67 next = next.next; 17.53/5.67 nextIndex++; 17.53/5.67 return lastReturned.element; 17.53/5.67 } 17.53/5.67 17.53/5.67 public boolean hasPrevious() { 17.53/5.67 return nextIndex != 0; 17.53/5.67 } 17.53/5.67 17.53/5.67 public E previous() { 17.53/5.67 if (nextIndex == 0) 17.53/5.67 throw new NoSuchElementException(); 17.53/5.67 17.53/5.67 lastReturned = next = next.previous; 17.53/5.67 nextIndex--; 17.53/5.67 checkForComodification(); 17.53/5.67 return lastReturned.element; 17.53/5.67 } 17.53/5.67 17.53/5.67 public int nextIndex() { 17.53/5.67 return nextIndex; 17.53/5.67 } 17.53/5.67 17.53/5.67 public int previousIndex() { 17.53/5.67 return nextIndex-1; 17.53/5.67 } 17.53/5.67 17.53/5.67 public void remove() { 17.53/5.67 checkForComodification(); 17.53/5.67 Entry lastNext = lastReturned.next; 17.53/5.67 try { 17.53/5.67 LinkedList.this.remove(lastReturned); 17.53/5.67 } catch (NoSuchElementException e) { 17.53/5.67 throw new IllegalStateException(); 17.53/5.67 } 17.53/5.67 if (next==lastReturned) 17.53/5.67 next = lastNext; 17.53/5.67 else 17.53/5.67 nextIndex--; 17.53/5.67 lastReturned = header; 17.53/5.67 expectedModCount++; 17.53/5.67 } 17.53/5.67 17.53/5.67 public void set(E e) { 17.53/5.67 if (lastReturned == header) 17.53/5.67 throw new IllegalStateException(); 17.53/5.67 checkForComodification(); 17.53/5.67 lastReturned.element = e; 17.53/5.67 } 17.53/5.67 17.53/5.67 public void add(E e) { 17.53/5.67 checkForComodification(); 17.53/5.67 lastReturned = header; 17.53/5.67 addBefore(e, next); 17.53/5.67 nextIndex++; 17.53/5.67 expectedModCount++; 17.53/5.67 } 17.53/5.67 17.53/5.67 final void checkForComodification() { 17.53/5.67 if (modCount != expectedModCount) 17.53/5.67 throw new ConcurrentModificationException(); 17.53/5.67 } 17.53/5.67 } 17.53/5.67 17.53/5.67 private static class Entry { 17.53/5.67 E element; 17.53/5.67 Entry next; 17.53/5.67 Entry previous; 17.53/5.67 17.53/5.67 Entry(E element, Entry next, Entry previous) { 17.53/5.67 this.element = element; 17.53/5.67 this.next = next; 17.53/5.67 this.previous = previous; 17.53/5.67 } 17.53/5.67 } 17.53/5.67 17.53/5.67 private Entry addBefore(E e, Entry entry) { 17.53/5.67 Entry newEntry = new Entry(e, entry, entry.previous); 17.53/5.67 newEntry.previous.next = newEntry; 17.53/5.67 newEntry.next.previous = newEntry; 17.53/5.67 size++; 17.53/5.67 modCount++; 17.53/5.67 return newEntry; 17.53/5.67 } 17.53/5.67 17.53/5.67 private E remove(Entry e) { 17.53/5.67 if (e == header) 17.53/5.67 throw new NoSuchElementException(); 17.53/5.67 17.53/5.67 E result = e.element; 17.53/5.67 e.previous.next = e.next; 17.53/5.67 e.next.previous = e.previous; 17.53/5.67 e.next = e.previous = null; 17.53/5.67 e.element = null; 17.53/5.67 size--; 17.53/5.67 modCount++; 17.53/5.67 return result; 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * @since 1.6 17.53/5.67 */ 17.53/5.67 public Iterator descendingIterator() { 17.53/5.67 return new DescendingIterator(); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** Adapter to provide descending iterators via ListItr.previous */ 17.53/5.67 private class DescendingIterator implements Iterator { 17.53/5.67 final ListItr itr = new ListItr(size()); 17.53/5.67 public boolean hasNext() { 17.53/5.67 return itr.hasPrevious(); 17.53/5.67 } 17.53/5.67 public E next() { 17.53/5.67 return itr.previous(); 17.53/5.67 } 17.53/5.67 public void remove() { 17.53/5.67 itr.remove(); 17.53/5.67 } 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns an array containing all of the elements in this list 17.53/5.67 * in proper sequence (from first to last element). 17.53/5.67 * 17.53/5.67 *

The returned array will be "safe" in that no references to it are 17.53/5.67 * maintained by this list. (In other words, this method must allocate 17.53/5.67 * a new array). The caller is thus free to modify the returned array. 17.53/5.67 * 17.53/5.67 *

This method acts as bridge between array-based and collection-based 17.53/5.67 * APIs. 17.53/5.67 * 17.53/5.67 * @return an array containing all of the elements in this list 17.53/5.67 * in proper sequence 17.53/5.67 */ 17.53/5.67 public Object[] toArray() { 17.53/5.67 Object[] result = new Object[size]; 17.53/5.67 int i = 0; 17.53/5.67 for (Entry e = header.next; e != header; e = e.next) 17.53/5.67 result[i++] = e.element; 17.53/5.67 return result; 17.53/5.67 } 17.53/5.67 17.53/5.67 private static final long serialVersionUID = 876323262645176354L; 17.53/5.67 } 17.53/5.67 17.53/5.67 17.53/5.67 /* 17.53/5.67 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.67 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.67 * 17.53/5.67 * This code is free software; you can redistribute it and/or modify it 17.53/5.67 * under the terms of the GNU General Public License version 2 only, as 17.53/5.67 * published by the Free Software Foundation. Sun designates this 17.53/5.67 * particular file as subject to the "Classpath" exception as provided 17.53/5.67 * by Sun in the LICENSE file that accompanied this code. 17.53/5.67 * 17.53/5.67 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.67 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.67 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.67 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.67 * accompanied this code). 17.53/5.67 * 17.53/5.67 * You should have received a copy of the GNU General Public License version 17.53/5.67 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.67 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.67 * 17.53/5.67 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.67 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.67 * have any questions. 17.53/5.67 */ 17.53/5.67 17.53/5.67 package javaUtilEx; 17.53/5.67 17.53/5.67 /** 17.53/5.67 * An iterator for lists that allows the programmer 17.53/5.67 * to traverse the list in either direction, modify 17.53/5.67 * the list during iteration, and obtain the iterator's 17.53/5.67 * current position in the list. A {@code ListIterator} 17.53/5.67 * has no current element; its cursor position always 17.53/5.67 * lies between the element that would be returned by a call 17.53/5.67 * to {@code previous()} and the element that would be 17.53/5.67 * returned by a call to {@code next()}. 17.53/5.67 * An iterator for a list of length {@code n} has {@code n+1} possible 17.53/5.67 * cursor positions, as illustrated by the carets ({@code ^}) below: 17.53/5.67 *

17.53/5.67	 *                      Element(0)   Element(1)   Element(2)   ... Element(n-1)
17.53/5.67	 * cursor positions:  ^            ^            ^            ^                  ^
17.53/5.67	 * 
17.53/5.67 * Note that the {@link #remove} and {@link #set(Object)} methods are 17.53/5.67 * not defined in terms of the cursor position; they are defined to 17.53/5.67 * operate on the last element returned by a call to {@link #next} or 17.53/5.67 * {@link #previous()}. 17.53/5.67 * 17.53/5.67 *

This interface is a member of the 17.53/5.67 * 17.53/5.67 * Java Collections Framework. 17.53/5.67 * 17.53/5.67 * @author Josh Bloch 17.53/5.67 * @see Collection 17.53/5.67 * @see List 17.53/5.67 * @see Iterator 17.53/5.67 * @see Enumeration 17.53/5.67 * @see List#listIterator() 17.53/5.67 * @since 1.2 17.53/5.67 */ 17.53/5.67 public interface ListIterator extends Iterator { 17.53/5.67 // Query Operations 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns {@code true} if this list iterator has more elements when 17.53/5.67 * traversing the list in the forward direction. (In other words, 17.53/5.67 * returns {@code true} if {@link #next} would return an element rather 17.53/5.67 * than throwing an exception.) 17.53/5.67 * 17.53/5.67 * @return {@code true} if the list iterator has more elements when 17.53/5.67 * traversing the list in the forward direction 17.53/5.67 */ 17.53/5.67 boolean hasNext(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the next element in the list and advances the cursor position. 17.53/5.67 * This method may be called repeatedly to iterate through the list, 17.53/5.67 * or intermixed with calls to {@link #previous} to go back and forth. 17.53/5.67 * (Note that alternating calls to {@code next} and {@code previous} 17.53/5.67 * will return the same element repeatedly.) 17.53/5.67 * 17.53/5.67 * @return the next element in the list 17.53/5.67 * @throws NoSuchElementException if the iteration has no next element 17.53/5.67 */ 17.53/5.67 E next(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns {@code true} if this list iterator has more elements when 17.53/5.67 * traversing the list in the reverse direction. (In other words, 17.53/5.67 * returns {@code true} if {@link #previous} would return an element 17.53/5.67 * rather than throwing an exception.) 17.53/5.67 * 17.53/5.67 * @return {@code true} if the list iterator has more elements when 17.53/5.67 * traversing the list in the reverse direction 17.53/5.67 */ 17.53/5.67 boolean hasPrevious(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the previous element in the list and moves the cursor 17.53/5.67 * position backwards. This method may be called repeatedly to 17.53/5.67 * iterate through the list backwards, or intermixed with calls to 17.53/5.67 * {@link #next} to go back and forth. (Note that alternating calls 17.53/5.67 * to {@code next} and {@code previous} will return the same 17.53/5.67 * element repeatedly.) 17.53/5.67 * 17.53/5.67 * @return the previous element in the list 17.53/5.67 * @throws NoSuchElementException if the iteration has no previous 17.53/5.67 * element 17.53/5.67 */ 17.53/5.67 E previous(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the index of the element that would be returned by a 17.53/5.67 * subsequent call to {@link #next}. (Returns list size if the list 17.53/5.67 * iterator is at the end of the list.) 17.53/5.67 * 17.53/5.67 * @return the index of the element that would be returned by a 17.53/5.67 * subsequent call to {@code next}, or list size if the list 17.53/5.67 * iterator is at the end of the list 17.53/5.67 */ 17.53/5.67 int nextIndex(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the index of the element that would be returned by a 17.53/5.67 * subsequent call to {@link #previous}. (Returns -1 if the list 17.53/5.67 * iterator is at the beginning of the list.) 17.53/5.67 * 17.53/5.67 * @return the index of the element that would be returned by a 17.53/5.67 * subsequent call to {@code previous}, or -1 if the list 17.53/5.67 * iterator is at the beginning of the list 17.53/5.67 */ 17.53/5.67 int previousIndex(); 17.53/5.67 17.53/5.67 17.53/5.67 // Modification Operations 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Removes from the list the last element that was returned by {@link 17.53/5.67 * #next} or {@link #previous} (optional operation). This call can 17.53/5.67 * only be made once per call to {@code next} or {@code previous}. 17.53/5.67 * It can be made only if {@link #add} has not been 17.53/5.67 * called after the last call to {@code next} or {@code previous}. 17.53/5.67 * 17.53/5.67 * @throws UnsupportedOperationException if the {@code remove} 17.53/5.67 * operation is not supported by this list iterator 17.53/5.67 * @throws IllegalStateException if neither {@code next} nor 17.53/5.67 * {@code previous} have been called, or {@code remove} or 17.53/5.67 * {@code add} have been called after the last call to 17.53/5.67 * {@code next} or {@code previous} 17.53/5.67 */ 17.53/5.67 void remove(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Replaces the last element returned by {@link #next} or 17.53/5.67 * {@link #previous} with the specified element (optional operation). 17.53/5.67 * This call can be made only if neither {@link #remove} nor {@link 17.53/5.67 * #add} have been called after the last call to {@code next} or 17.53/5.67 * {@code previous}. 17.53/5.67 * 17.53/5.67 * @param e the element with which to replace the last element returned by 17.53/5.67 * {@code next} or {@code previous} 17.53/5.67 * @throws UnsupportedOperationException if the {@code set} operation 17.53/5.67 * is not supported by this list iterator 17.53/5.67 * @throws ClassCastException if the class of the specified element 17.53/5.67 * prevents it from being added to this list 17.53/5.67 * @throws IllegalArgumentException if some aspect of the specified 17.53/5.67 * element prevents it from being added to this list 17.53/5.67 * @throws IllegalStateException if neither {@code next} nor 17.53/5.67 * {@code previous} have been called, or {@code remove} or 17.53/5.67 * {@code add} have been called after the last call to 17.53/5.67 * {@code next} or {@code previous} 17.53/5.67 */ 17.53/5.67 void set(E e); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Inserts the specified element into the list (optional operation). 17.53/5.67 * The element is inserted immediately before the next element that 17.53/5.67 * would be returned by {@link #next}, if any, and after the next 17.53/5.67 * element that would be returned by {@link #previous}, if any. (If the 17.53/5.67 * list contains no elements, the new element becomes the sole element 17.53/5.67 * on the list.) The new element is inserted before the implicit 17.53/5.67 * cursor: a subsequent call to {@code next} would be unaffected, and a 17.53/5.67 * subsequent call to {@code previous} would return the new element. 17.53/5.67 * (This call increases by one the value that would be returned by a 17.53/5.67 * call to {@code nextIndex} or {@code previousIndex}.) 17.53/5.67 * 17.53/5.67 * @param e the element to insert 17.53/5.67 * @throws UnsupportedOperationException if the {@code add} method is 17.53/5.67 * not supported by this list iterator 17.53/5.67 * @throws ClassCastException if the class of the specified element 17.53/5.67 * prevents it from being added to this list 17.53/5.67 * @throws IllegalArgumentException if some aspect of this element 17.53/5.67 * prevents it from being added to this list 17.53/5.67 */ 17.53/5.67 void add(E e); 17.53/5.67 } 17.53/5.67 17.53/5.67 17.53/5.67 /* 17.53/5.67 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.67 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.67 * 17.53/5.67 * This code is free software; you can redistribute it and/or modify it 17.53/5.67 * under the terms of the GNU General Public License version 2 only, as 17.53/5.67 * published by the Free Software Foundation. Sun designates this 17.53/5.67 * particular file as subject to the "Classpath" exception as provided 17.53/5.67 * by Sun in the LICENSE file that accompanied this code. 17.53/5.67 * 17.53/5.67 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.67 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.67 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.67 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.67 * accompanied this code). 17.53/5.67 * 17.53/5.67 * You should have received a copy of the GNU General Public License version 17.53/5.67 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.67 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.67 * 17.53/5.67 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.67 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.67 * have any questions. 17.53/5.67 */ 17.53/5.67 17.53/5.67 package javaUtilEx; 17.53/5.67 17.53/5.67 /** 17.53/5.67 * An ordered collection (also known as a sequence). The user of this 17.53/5.67 * interface has precise control over where in the list each element is 17.53/5.67 * inserted. The user can access elements by their integer index (position in 17.53/5.67 * the list), and search for elements in the list.

17.53/5.67 * 17.53/5.67 * Unlike sets, lists typically allow duplicate elements. More formally, 17.53/5.67 * lists typically allow pairs of elements e1 and e2 17.53/5.67 * such that e1.equals(e2), and they typically allow multiple 17.53/5.67 * null elements if they allow null elements at all. It is not inconceivable 17.53/5.67 * that someone might wish to implement a list that prohibits duplicates, by 17.53/5.67 * throwing runtime exceptions when the user attempts to insert them, but we 17.53/5.67 * expect this usage to be rare.

17.53/5.67 * 17.53/5.67 * The List interface places additional stipulations, beyond those 17.53/5.67 * specified in the Collection interface, on the contracts of the 17.53/5.67 * iterator, add, remove, equals, and 17.53/5.67 * hashCode methods. Declarations for other inherited methods are 17.53/5.67 * also included here for convenience.

17.53/5.67 * 17.53/5.67 * The List interface provides four methods for positional (indexed) 17.53/5.67 * access to list elements. Lists (like Java arrays) are zero based. Note 17.53/5.67 * that these operations may execute in time proportional to the index value 17.53/5.67 * for some implementations (the LinkedList class, for 17.53/5.67 * example). Thus, iterating over the elements in a list is typically 17.53/5.67 * preferable to indexing through it if the caller does not know the 17.53/5.67 * implementation.

17.53/5.67 * 17.53/5.67 * The List interface provides a special iterator, called a 17.53/5.67 * ListIterator, that allows element insertion and replacement, and 17.53/5.67 * bidirectional access in addition to the normal operations that the 17.53/5.67 * Iterator interface provides. A method is provided to obtain a 17.53/5.67 * list iterator that starts at a specified position in the list.

17.53/5.67 * 17.53/5.67 * The List interface provides two methods to search for a specified 17.53/5.67 * object. From a performance standpoint, these methods should be used with 17.53/5.67 * caution. In many implementations they will perform costly linear 17.53/5.67 * searches.

17.53/5.67 * 17.53/5.67 * The List interface provides two methods to efficiently insert and 17.53/5.67 * remove multiple elements at an arbitrary point in the list.

17.53/5.67 * 17.53/5.67 * Note: While it is permissible for lists to contain themselves as elements, 17.53/5.67 * extreme caution is advised: the equals and hashCode 17.53/5.67 * methods are no longer well defined on such a list. 17.53/5.67 * 17.53/5.67 *

Some list implementations have restrictions on the elements that 17.53/5.67 * they may contain. For example, some implementations prohibit null elements, 17.53/5.67 * and some have restrictions on the types of their elements. Attempting to 17.53/5.67 * add an ineligible element throws an unchecked exception, typically 17.53/5.67 * NullPointerException or ClassCastException. Attempting 17.53/5.67 * to query the presence of an ineligible element may throw an exception, 17.53/5.67 * or it may simply return false; some implementations will exhibit the former 17.53/5.67 * behavior and some will exhibit the latter. More generally, attempting an 17.53/5.67 * operation on an ineligible element whose completion would not result in 17.53/5.67 * the insertion of an ineligible element into the list may throw an 17.53/5.67 * exception or it may succeed, at the option of the implementation. 17.53/5.67 * Such exceptions are marked as "optional" in the specification for this 17.53/5.67 * interface. 17.53/5.67 * 17.53/5.67 *

This interface is a member of the 17.53/5.67 * 17.53/5.67 * Java Collections Framework. 17.53/5.67 * 17.53/5.67 * @author Josh Bloch 17.53/5.67 * @author Neal Gafter 17.53/5.67 * @see Collection 17.53/5.67 * @see Set 17.53/5.67 * @see ArrayList 17.53/5.67 * @see LinkedList 17.53/5.67 * @see Vector 17.53/5.67 * @see Arrays#asList(Object[]) 17.53/5.67 * @see Collections#nCopies(int, Object) 17.53/5.67 * @see Collections#EMPTY_LIST 17.53/5.67 * @see AbstractList 17.53/5.67 * @see AbstractSequentialList 17.53/5.67 * @since 1.2 17.53/5.67 */ 17.53/5.67 17.53/5.67 public interface List extends Collection { 17.53/5.67 // Query Operations 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the number of elements in this list. If this list contains 17.53/5.67 * more than Integer.MAX_VALUE elements, returns 17.53/5.67 * Integer.MAX_VALUE. 17.53/5.67 * 17.53/5.67 * @return the number of elements in this list 17.53/5.67 */ 17.53/5.67 int size(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns true if this list contains no elements. 17.53/5.67 * 17.53/5.67 * @return true if this list contains no elements 17.53/5.67 */ 17.53/5.67 boolean isEmpty(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns true if this list contains the specified element. 17.53/5.67 * More formally, returns true if and only if this list contains 17.53/5.67 * at least one element e such that 17.53/5.67 * (o==null ? e==null : o.equals(e)). 17.53/5.67 * 17.53/5.67 * @param o element whose presence in this list is to be tested 17.53/5.67 * @return true if this list contains the specified element 17.53/5.67 * @throws ClassCastException if the type of the specified element 17.53/5.67 * is incompatible with this list (optional) 17.53/5.67 * @throws NullPointerException if the specified element is null and this 17.53/5.67 * list does not permit null elements (optional) 17.53/5.67 */ 17.53/5.67 boolean contains(Object o); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns an iterator over the elements in this list in proper sequence. 17.53/5.67 * 17.53/5.67 * @return an iterator over the elements in this list in proper sequence 17.53/5.67 */ 17.53/5.67 Iterator iterator(); 17.53/5.67 17.53/5.67 // Modification Operations 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Appends the specified element to the end of this list (optional 17.53/5.67 * operation). 17.53/5.67 * 17.53/5.67 *

Lists that support this operation may place limitations on what 17.53/5.67 * elements may be added to this list. In particular, some 17.53/5.67 * lists will refuse to add null elements, and others will impose 17.53/5.67 * restrictions on the type of elements that may be added. List 17.53/5.67 * classes should clearly specify in their documentation any restrictions 17.53/5.67 * on what elements may be added. 17.53/5.67 * 17.53/5.67 * @param e element to be appended to this list 17.53/5.67 * @return true (as specified by {@link Collection#add}) 17.53/5.67 * @throws UnsupportedOperationException if the add operation 17.53/5.67 * is not supported by this list 17.53/5.67 * @throws ClassCastException if the class of the specified element 17.53/5.67 * prevents it from being added to this list 17.53/5.67 * @throws NullPointerException if the specified element is null and this 17.53/5.67 * list does not permit null elements 17.53/5.67 * @throws IllegalArgumentException if some property of this element 17.53/5.67 * prevents it from being added to this list 17.53/5.67 */ 17.53/5.67 boolean add(E e); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Removes the first occurrence of the specified element from this list, 17.53/5.67 * if it is present (optional operation). If this list does not contain 17.53/5.67 * the element, it is unchanged. More formally, removes the element with 17.53/5.67 * the lowest index i such that 17.53/5.67 * (o==null ? get(i)==null : o.equals(get(i))) 17.53/5.67 * (if such an element exists). Returns true if this list 17.53/5.67 * contained the specified element (or equivalently, if this list changed 17.53/5.67 * as a result of the call). 17.53/5.67 * 17.53/5.67 * @param o element to be removed from this list, if present 17.53/5.67 * @return true if this list contained the specified element 17.53/5.67 * @throws ClassCastException if the type of the specified element 17.53/5.67 * is incompatible with this list (optional) 17.53/5.67 * @throws NullPointerException if the specified element is null and this 17.53/5.67 * list does not permit null elements (optional) 17.53/5.67 * @throws UnsupportedOperationException if the remove operation 17.53/5.67 * is not supported by this list 17.53/5.67 */ 17.53/5.67 boolean remove(Object o); 17.53/5.67 17.53/5.67 17.53/5.67 // Bulk Modification Operations 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns true if this list contains all of the elements of the 17.53/5.67 * specified collection. 17.53/5.67 * 17.53/5.67 * @param c collection to be checked for containment in this list 17.53/5.67 * @return true if this list contains all of the elements of the 17.53/5.67 * specified collection 17.53/5.67 * @throws ClassCastException if the types of one or more elements 17.53/5.67 * in the specified collection are incompatible with this 17.53/5.67 * list (optional) 17.53/5.67 * @throws NullPointerException if the specified collection contains one 17.53/5.67 * or more null elements and this list does not permit null 17.53/5.67 * elements (optional), or if the specified collection is null 17.53/5.67 * @see #contains(Object) 17.53/5.67 */ 17.53/5.67 boolean containsAll(Collection c); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Appends all of the elements in the specified collection to the end of 17.53/5.67 * this list, in the order that they are returned by the specified 17.53/5.67 * collection's iterator (optional operation). The behavior of this 17.53/5.67 * operation is undefined if the specified collection is modified while 17.53/5.67 * the operation is in progress. (Note that this will occur if the 17.53/5.67 * specified collection is this list, and it's nonempty.) 17.53/5.67 * 17.53/5.67 * @param c collection containing elements to be added to this list 17.53/5.67 * @return true if this list changed as a result of the call 17.53/5.67 * @throws UnsupportedOperationException if the addAll operation 17.53/5.67 * is not supported by this list 17.53/5.67 * @throws ClassCastException if the class of an element of the specified 17.53/5.67 * collection prevents it from being added to this list 17.53/5.67 * @throws NullPointerException if the specified collection contains one 17.53/5.67 * or more null elements and this list does not permit null 17.53/5.67 * elements, or if the specified collection is null 17.53/5.67 * @throws IllegalArgumentException if some property of an element of the 17.53/5.67 * specified collection prevents it from being added to this list 17.53/5.67 * @see #add(Object) 17.53/5.67 */ 17.53/5.67 boolean addAll(Collection c); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Inserts all of the elements in the specified collection into this 17.53/5.67 * list at the specified position (optional operation). Shifts the 17.53/5.67 * element currently at that position (if any) and any subsequent 17.53/5.67 * elements to the right (increases their indices). The new elements 17.53/5.67 * will appear in this list in the order that they are returned by the 17.53/5.67 * specified collection's iterator. The behavior of this operation is 17.53/5.67 * undefined if the specified collection is modified while the 17.53/5.67 * operation is in progress. (Note that this will occur if the specified 17.53/5.67 * collection is this list, and it's nonempty.) 17.53/5.67 * 17.53/5.67 * @param index index at which to insert the first element from the 17.53/5.67 * specified collection 17.53/5.67 * @param c collection containing elements to be added to this list 17.53/5.67 * @return true if this list changed as a result of the call 17.53/5.67 * @throws UnsupportedOperationException if the addAll operation 17.53/5.67 * is not supported by this list 17.53/5.67 * @throws ClassCastException if the class of an element of the specified 17.53/5.67 * collection prevents it from being added to this list 17.53/5.67 * @throws NullPointerException if the specified collection contains one 17.53/5.67 * or more null elements and this list does not permit null 17.53/5.67 * elements, or if the specified collection is null 17.53/5.67 * @throws IllegalArgumentException if some property of an element of the 17.53/5.67 * specified collection prevents it from being added to this list 17.53/5.67 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.67 * (index < 0 || index > size()) 17.53/5.67 */ 17.53/5.67 boolean addAll(int index, Collection c); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Removes from this list all of its elements that are contained in the 17.53/5.67 * specified collection (optional operation). 17.53/5.67 * 17.53/5.67 * @param c collection containing elements to be removed from this list 17.53/5.67 * @return true if this list changed as a result of the call 17.53/5.67 * @throws UnsupportedOperationException if the removeAll operation 17.53/5.67 * is not supported by this list 17.53/5.67 * @throws ClassCastException if the class of an element of this list 17.53/5.67 * is incompatible with the specified collection (optional) 17.53/5.67 * @throws NullPointerException if this list contains a null element and the 17.53/5.67 * specified collection does not permit null elements (optional), 17.53/5.67 * or if the specified collection is null 17.53/5.67 * @see #remove(Object) 17.53/5.67 * @see #contains(Object) 17.53/5.67 */ 17.53/5.67 boolean removeAll(Collection c); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retains only the elements in this list that are contained in the 17.53/5.67 * specified collection (optional operation). In other words, removes 17.53/5.67 * from this list all of its elements that are not contained in the 17.53/5.67 * specified collection. 17.53/5.67 * 17.53/5.67 * @param c collection containing elements to be retained in this list 17.53/5.67 * @return true if this list changed as a result of the call 17.53/5.67 * @throws UnsupportedOperationException if the retainAll operation 17.53/5.67 * is not supported by this list 17.53/5.67 * @throws ClassCastException if the class of an element of this list 17.53/5.67 * is incompatible with the specified collection (optional) 17.53/5.67 * @throws NullPointerException if this list contains a null element and the 17.53/5.67 * specified collection does not permit null elements (optional), 17.53/5.67 * or if the specified collection is null 17.53/5.67 * @see #remove(Object) 17.53/5.67 * @see #contains(Object) 17.53/5.67 */ 17.53/5.67 boolean retainAll(Collection c); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Removes all of the elements from this list (optional operation). 17.53/5.67 * The list will be empty after this call returns. 17.53/5.67 * 17.53/5.67 * @throws UnsupportedOperationException if the clear operation 17.53/5.67 * is not supported by this list 17.53/5.67 */ 17.53/5.67 void clear(); 17.53/5.67 17.53/5.67 17.53/5.67 // Comparison and hashing 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Compares the specified object with this list for equality. Returns 17.53/5.67 * true if and only if the specified object is also a list, both 17.53/5.67 * lists have the same size, and all corresponding pairs of elements in 17.53/5.67 * the two lists are equal. (Two elements e1 and 17.53/5.67 * e2 are equal if (e1==null ? e2==null : 17.53/5.67 * e1.equals(e2)).) In other words, two lists are defined to be 17.53/5.67 * equal if they contain the same elements in the same order. This 17.53/5.67 * definition ensures that the equals method works properly across 17.53/5.67 * different implementations of the List interface. 17.53/5.67 * 17.53/5.67 * @param o the object to be compared for equality with this list 17.53/5.67 * @return true if the specified object is equal to this list 17.53/5.67 */ 17.53/5.67 boolean equals(Object o); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the hash code value for this list. The hash code of a list 17.53/5.67 * is defined to be the result of the following calculation: 17.53/5.67 *

17.53/5.67	     *  int hashCode = 1;
17.53/5.67	     *  for (E e : list)
17.53/5.67	     *      hashCode = 31*hashCode + (e==null ? 0 : e.hashCode());
17.53/5.67	     * 
17.53/5.67 * This ensures that list1.equals(list2) implies that 17.53/5.67 * list1.hashCode()==list2.hashCode() for any two lists, 17.53/5.67 * list1 and list2, as required by the general 17.53/5.67 * contract of {@link Object#hashCode}. 17.53/5.67 * 17.53/5.67 * @return the hash code value for this list 17.53/5.67 * @see Object#equals(Object) 17.53/5.67 * @see #equals(Object) 17.53/5.67 */ 17.53/5.67 int hashCode(); 17.53/5.67 17.53/5.67 17.53/5.67 // Positional Access Operations 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the element at the specified position in this list. 17.53/5.67 * 17.53/5.67 * @param index index of the element to return 17.53/5.67 * @return the element at the specified position in this list 17.53/5.67 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.67 * (index < 0 || index >= size()) 17.53/5.67 */ 17.53/5.67 E get(int index); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Replaces the element at the specified position in this list with the 17.53/5.67 * specified element (optional operation). 17.53/5.67 * 17.53/5.67 * @param index index of the element to replace 17.53/5.67 * @param element element to be stored at the specified position 17.53/5.67 * @return the element previously at the specified position 17.53/5.67 * @throws UnsupportedOperationException if the set operation 17.53/5.67 * is not supported by this list 17.53/5.67 * @throws ClassCastException if the class of the specified element 17.53/5.67 * prevents it from being added to this list 17.53/5.67 * @throws NullPointerException if the specified element is null and 17.53/5.67 * this list does not permit null elements 17.53/5.67 * @throws IllegalArgumentException if some property of the specified 17.53/5.67 * element prevents it from being added to this list 17.53/5.67 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.67 * (index < 0 || index >= size()) 17.53/5.67 */ 17.53/5.67 E set(int index, E element); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Inserts the specified element at the specified position in this list 17.53/5.67 * (optional operation). Shifts the element currently at that position 17.53/5.67 * (if any) and any subsequent elements to the right (adds one to their 17.53/5.67 * indices). 17.53/5.67 * 17.53/5.67 * @param index index at which the specified element is to be inserted 17.53/5.67 * @param element element to be inserted 17.53/5.67 * @throws UnsupportedOperationException if the add operation 17.53/5.67 * is not supported by this list 17.53/5.67 * @throws ClassCastException if the class of the specified element 17.53/5.67 * prevents it from being added to this list 17.53/5.67 * @throws NullPointerException if the specified element is null and 17.53/5.67 * this list does not permit null elements 17.53/5.67 * @throws IllegalArgumentException if some property of the specified 17.53/5.67 * element prevents it from being added to this list 17.53/5.67 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.67 * (index < 0 || index > size()) 17.53/5.67 */ 17.53/5.67 void add(int index, E element); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Removes the element at the specified position in this list (optional 17.53/5.67 * operation). Shifts any subsequent elements to the left (subtracts one 17.53/5.67 * from their indices). Returns the element that was removed from the 17.53/5.67 * list. 17.53/5.67 * 17.53/5.67 * @param index the index of the element to be removed 17.53/5.67 * @return the element previously at the specified position 17.53/5.67 * @throws UnsupportedOperationException if the remove operation 17.53/5.67 * is not supported by this list 17.53/5.67 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.67 * (index < 0 || index >= size()) 17.53/5.67 */ 17.53/5.67 E remove(int index); 17.53/5.67 17.53/5.67 17.53/5.67 // Search Operations 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the index of the first occurrence of the specified element 17.53/5.67 * in this list, or -1 if this list does not contain the element. 17.53/5.67 * More formally, returns the lowest index i such that 17.53/5.67 * (o==null ? get(i)==null : o.equals(get(i))), 17.53/5.67 * or -1 if there is no such index. 17.53/5.67 * 17.53/5.67 * @param o element to search for 17.53/5.67 * @return the index of the first occurrence of the specified element in 17.53/5.67 * this list, or -1 if this list does not contain the element 17.53/5.67 * @throws ClassCastException if the type of the specified element 17.53/5.67 * is incompatible with this list (optional) 17.53/5.67 * @throws NullPointerException if the specified element is null and this 17.53/5.67 * list does not permit null elements (optional) 17.53/5.67 */ 17.53/5.67 int indexOf(Object o); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns the index of the last occurrence of the specified element 17.53/5.67 * in this list, or -1 if this list does not contain the element. 17.53/5.67 * More formally, returns the highest index i such that 17.53/5.67 * (o==null ? get(i)==null : o.equals(get(i))), 17.53/5.67 * or -1 if there is no such index. 17.53/5.67 * 17.53/5.67 * @param o element to search for 17.53/5.67 * @return the index of the last occurrence of the specified element in 17.53/5.67 * this list, or -1 if this list does not contain the element 17.53/5.67 * @throws ClassCastException if the type of the specified element 17.53/5.67 * is incompatible with this list (optional) 17.53/5.67 * @throws NullPointerException if the specified element is null and this 17.53/5.67 * list does not permit null elements (optional) 17.53/5.67 */ 17.53/5.67 int lastIndexOf(Object o); 17.53/5.67 17.53/5.67 17.53/5.67 // List Iterators 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns a list iterator over the elements in this list (in proper 17.53/5.67 * sequence). 17.53/5.67 * 17.53/5.67 * @return a list iterator over the elements in this list (in proper 17.53/5.67 * sequence) 17.53/5.67 */ 17.53/5.67 ListIterator listIterator(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns a list iterator over the elements in this list (in proper 17.53/5.67 * sequence), starting at the specified position in the list. 17.53/5.67 * The specified index indicates the first element that would be 17.53/5.67 * returned by an initial call to {@link ListIterator#next next}. 17.53/5.67 * An initial call to {@link ListIterator#previous previous} would 17.53/5.67 * return the element with the specified index minus one. 17.53/5.67 * 17.53/5.67 * @param index index of the first element to be returned from the 17.53/5.67 * list iterator (by a call to {@link ListIterator#next next}) 17.53/5.67 * @return a list iterator over the elements in this list (in proper 17.53/5.67 * sequence), starting at the specified position in the list 17.53/5.67 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.67 * ({@code index < 0 || index > size()}) 17.53/5.67 */ 17.53/5.67 ListIterator listIterator(int index); 17.53/5.67 17.53/5.67 // View 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Returns a view of the portion of this list between the specified 17.53/5.67 * fromIndex, inclusive, and toIndex, exclusive. (If 17.53/5.67 * fromIndex and toIndex are equal, the returned list is 17.53/5.67 * empty.) The returned list is backed by this list, so non-structural 17.53/5.67 * changes in the returned list are reflected in this list, and vice-versa. 17.53/5.67 * The returned list supports all of the optional list operations supported 17.53/5.67 * by this list.

17.53/5.67 * 17.53/5.67 * This method eliminates the need for explicit range operations (of 17.53/5.67 * the sort that commonly exist for arrays). Any operation that expects 17.53/5.67 * a list can be used as a range operation by passing a subList view 17.53/5.67 * instead of a whole list. For example, the following idiom 17.53/5.67 * removes a range of elements from a list: 17.53/5.67 *

17.53/5.67	     *      list.subList(from, to).clear();
17.53/5.67	     * 
17.53/5.67 * Similar idioms may be constructed for indexOf and 17.53/5.67 * lastIndexOf, and all of the algorithms in the 17.53/5.67 * Collections class can be applied to a subList.

17.53/5.67 * 17.53/5.67 * The semantics of the list returned by this method become undefined if 17.53/5.67 * the backing list (i.e., this list) is structurally modified in 17.53/5.67 * any way other than via the returned list. (Structural modifications are 17.53/5.67 * those that change the size of this list, or otherwise perturb it in such 17.53/5.67 * a fashion that iterations in progress may yield incorrect results.) 17.53/5.67 * 17.53/5.67 * @param fromIndex low endpoint (inclusive) of the subList 17.53/5.67 * @param toIndex high endpoint (exclusive) of the subList 17.53/5.67 * @return a view of the specified range within this list 17.53/5.67 * @throws IndexOutOfBoundsException for an illegal endpoint index value 17.53/5.67 * (fromIndex < 0 || toIndex > size || 17.53/5.67 * fromIndex > toIndex) 17.53/5.67 */ 17.53/5.67 List subList(int fromIndex, int toIndex); 17.53/5.67 } 17.53/5.67 17.53/5.67 17.53/5.67 /* 17.53/5.67 * Copyright 1994-1998 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.67 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.67 * 17.53/5.67 * This code is free software; you can redistribute it and/or modify it 17.53/5.67 * under the terms of the GNU General Public License version 2 only, as 17.53/5.67 * published by the Free Software Foundation. Sun designates this 17.53/5.67 * particular file as subject to the "Classpath" exception as provided 17.53/5.67 * by Sun in the LICENSE file that accompanied this code. 17.53/5.67 * 17.53/5.67 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.67 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.67 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.67 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.67 * accompanied this code). 17.53/5.67 * 17.53/5.67 * You should have received a copy of the GNU General Public License version 17.53/5.67 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.67 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.67 * 17.53/5.67 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.67 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.67 * have any questions. 17.53/5.67 */ 17.53/5.67 17.53/5.67 package javaUtilEx; 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Thrown by the nextElement method of an 17.53/5.67 * Enumeration to indicate that there are no more 17.53/5.67 * elements in the enumeration. 17.53/5.67 * 17.53/5.67 * @author unascribed 17.53/5.67 * @see java.util.Enumeration 17.53/5.67 * @see java.util.Enumeration#nextElement() 17.53/5.67 * @since JDK1.0 17.53/5.67 */ 17.53/5.67 public 17.53/5.67 class NoSuchElementException extends RuntimeException { 17.53/5.67 /** 17.53/5.67 * Constructs a NoSuchElementException with null 17.53/5.67 * as its error message string. 17.53/5.67 */ 17.53/5.67 public NoSuchElementException() { 17.53/5.67 super(); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Constructs a NoSuchElementException, saving a reference 17.53/5.67 * to the error message string s for later retrieval by the 17.53/5.67 * getMessage method. 17.53/5.67 * 17.53/5.67 * @param s the detail message. 17.53/5.67 */ 17.53/5.67 public NoSuchElementException(String s) { 17.53/5.67 super(s); 17.53/5.67 } 17.53/5.67 } 17.53/5.67 17.53/5.67 17.53/5.67 /* 17.53/5.67 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.67 * 17.53/5.67 * This code is free software; you can redistribute it and/or modify it 17.53/5.67 * under the terms of the GNU General Public License version 2 only, as 17.53/5.67 * published by the Free Software Foundation. Sun designates this 17.53/5.67 * particular file as subject to the "Classpath" exception as provided 17.53/5.67 * by Sun in the LICENSE file that accompanied this code. 17.53/5.67 * 17.53/5.67 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.67 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.67 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.67 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.67 * accompanied this code). 17.53/5.67 * 17.53/5.67 * You should have received a copy of the GNU General Public License version 17.53/5.67 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.67 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.67 * 17.53/5.67 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.67 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.67 * have any questions. 17.53/5.67 */ 17.53/5.67 17.53/5.67 /* 17.53/5.67 * This file is available under and governed by the GNU General Public 17.53/5.67 * License version 2 only, as published by the Free Software Foundation. 17.53/5.67 * However, the following notice accompanied the original version of this 17.53/5.67 * file: 17.53/5.67 * 17.53/5.67 * Written by Doug Lea with assistance from members of JCP JSR-166 17.53/5.67 * Expert Group and released to the public domain, as explained at 17.53/5.67 * http://creativecommons.org/licenses/publicdomain 17.53/5.67 */ 17.53/5.67 17.53/5.67 package javaUtilEx; 17.53/5.67 17.53/5.67 /** 17.53/5.67 * A collection designed for holding elements prior to processing. 17.53/5.67 * Besides basic {@link java.util.Collection Collection} operations, 17.53/5.67 * queues provide additional insertion, extraction, and inspection 17.53/5.67 * operations. Each of these methods exists in two forms: one throws 17.53/5.67 * an exception if the operation fails, the other returns a special 17.53/5.67 * value (either null or false, depending on the 17.53/5.67 * operation). The latter form of the insert operation is designed 17.53/5.67 * specifically for use with capacity-restricted Queue 17.53/5.67 * implementations; in most implementations, insert operations cannot 17.53/5.67 * fail. 17.53/5.67 * 17.53/5.67 *

17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 * 17.53/5.67 *
Throws exceptionReturns special value
Insert{@link #add add(e)}{@link #offer offer(e)}
Remove{@link #remove remove()}{@link #poll poll()}
Examine{@link #element element()}{@link #peek peek()}
17.53/5.67 * 17.53/5.67 *

Queues typically, but do not necessarily, order elements in a 17.53/5.67 * FIFO (first-in-first-out) manner. Among the exceptions are 17.53/5.67 * priority queues, which order elements according to a supplied 17.53/5.67 * comparator, or the elements' natural ordering, and LIFO queues (or 17.53/5.67 * stacks) which order the elements LIFO (last-in-first-out). 17.53/5.67 * Whatever the ordering used, the head of the queue is that 17.53/5.67 * element which would be removed by a call to {@link #remove() } or 17.53/5.67 * {@link #poll()}. In a FIFO queue, all new elements are inserted at 17.53/5.67 * the tail of the queue. Other kinds of queues may use 17.53/5.67 * different placement rules. Every Queue implementation 17.53/5.67 * must specify its ordering properties. 17.53/5.67 * 17.53/5.67 *

The {@link #offer offer} method inserts an element if possible, 17.53/5.67 * otherwise returning false. This differs from the {@link 17.53/5.67 * java.util.Collection#add Collection.add} method, which can fail to 17.53/5.67 * add an element only by throwing an unchecked exception. The 17.53/5.67 * offer method is designed for use when failure is a normal, 17.53/5.67 * rather than exceptional occurrence, for example, in fixed-capacity 17.53/5.67 * (or "bounded") queues. 17.53/5.67 * 17.53/5.67 *

The {@link #remove()} and {@link #poll()} methods remove and 17.53/5.67 * return the head of the queue. 17.53/5.67 * Exactly which element is removed from the queue is a 17.53/5.67 * function of the queue's ordering policy, which differs from 17.53/5.67 * implementation to implementation. The remove() and 17.53/5.67 * poll() methods differ only in their behavior when the 17.53/5.67 * queue is empty: the remove() method throws an exception, 17.53/5.67 * while the poll() method returns null. 17.53/5.67 * 17.53/5.67 *

The {@link #element()} and {@link #peek()} methods return, but do 17.53/5.67 * not remove, the head of the queue. 17.53/5.67 * 17.53/5.67 *

The Queue interface does not define the blocking queue 17.53/5.67 * methods, which are common in concurrent programming. These methods, 17.53/5.67 * which wait for elements to appear or for space to become available, are 17.53/5.67 * defined in the {@link java.util.concurrent.BlockingQueue} interface, which 17.53/5.67 * extends this interface. 17.53/5.67 * 17.53/5.67 *

Queue implementations generally do not allow insertion 17.53/5.67 * of null elements, although some implementations, such as 17.53/5.67 * {@link LinkedList}, do not prohibit insertion of null. 17.53/5.67 * Even in the implementations that permit it, null should 17.53/5.67 * not be inserted into a Queue, as null is also 17.53/5.67 * used as a special return value by the poll method to 17.53/5.67 * indicate that the queue contains no elements. 17.53/5.67 * 17.53/5.67 *

Queue implementations generally do not define 17.53/5.67 * element-based versions of methods equals and 17.53/5.67 * hashCode but instead inherit the identity based versions 17.53/5.67 * from class Object, because element-based equality is not 17.53/5.67 * always well-defined for queues with the same elements but different 17.53/5.67 * ordering properties. 17.53/5.67 * 17.53/5.67 * 17.53/5.67 *

This interface is a member of the 17.53/5.67 * 17.53/5.67 * Java Collections Framework. 17.53/5.67 * 17.53/5.67 * @see java.util.Collection 17.53/5.67 * @see LinkedList 17.53/5.67 * @see PriorityQueue 17.53/5.67 * @see java.util.concurrent.LinkedBlockingQueue 17.53/5.67 * @see java.util.concurrent.BlockingQueue 17.53/5.67 * @see java.util.concurrent.ArrayBlockingQueue 17.53/5.67 * @see java.util.concurrent.LinkedBlockingQueue 17.53/5.67 * @see java.util.concurrent.PriorityBlockingQueue 17.53/5.67 * @since 1.5 17.53/5.67 * @author Doug Lea 17.53/5.67 * @param the type of elements held in this collection 17.53/5.67 */ 17.53/5.67 public interface Queue extends Collection { 17.53/5.67 /** 17.53/5.67 * Inserts the specified element into this queue if it is possible to do so 17.53/5.67 * immediately without violating capacity restrictions, returning 17.53/5.67 * true upon success and throwing an IllegalStateException 17.53/5.67 * if no space is currently available. 17.53/5.67 * 17.53/5.67 * @param e the element to add 17.53/5.67 * @return true (as specified by {@link Collection#add}) 17.53/5.67 * @throws IllegalStateException if the element cannot be added at this 17.53/5.67 * time due to capacity restrictions 17.53/5.67 * @throws ClassCastException if the class of the specified element 17.53/5.67 * prevents it from being added to this queue 17.53/5.67 * @throws NullPointerException if the specified element is null and 17.53/5.67 * this queue does not permit null elements 17.53/5.67 * @throws IllegalArgumentException if some property of this element 17.53/5.67 * prevents it from being added to this queue 17.53/5.67 */ 17.53/5.67 boolean add(E e); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Inserts the specified element into this queue if it is possible to do 17.53/5.67 * so immediately without violating capacity restrictions. 17.53/5.67 * When using a capacity-restricted queue, this method is generally 17.53/5.67 * preferable to {@link #add}, which can fail to insert an element only 17.53/5.67 * by throwing an exception. 17.53/5.67 * 17.53/5.67 * @param e the element to add 17.53/5.67 * @return true if the element was added to this queue, else 17.53/5.67 * false 17.53/5.67 * @throws ClassCastException if the class of the specified element 17.53/5.67 * prevents it from being added to this queue 17.53/5.67 * @throws NullPointerException if the specified element is null and 17.53/5.67 * this queue does not permit null elements 17.53/5.67 * @throws IllegalArgumentException if some property of this element 17.53/5.67 * prevents it from being added to this queue 17.53/5.67 */ 17.53/5.67 boolean offer(E e); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves and removes the head of this queue. This method differs 17.53/5.67 * from {@link #poll poll} only in that it throws an exception if this 17.53/5.67 * queue is empty. 17.53/5.67 * 17.53/5.67 * @return the head of this queue 17.53/5.67 * @throws NoSuchElementException if this queue is empty 17.53/5.67 */ 17.53/5.67 E remove(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves and removes the head of this queue, 17.53/5.67 * or returns null if this queue is empty. 17.53/5.67 * 17.53/5.67 * @return the head of this queue, or null if this queue is empty 17.53/5.67 */ 17.53/5.67 E poll(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves, but does not remove, the head of this queue. This method 17.53/5.67 * differs from {@link #peek peek} only in that it throws an exception 17.53/5.67 * if this queue is empty. 17.53/5.67 * 17.53/5.67 * @return the head of this queue 17.53/5.67 * @throws NoSuchElementException if this queue is empty 17.53/5.67 */ 17.53/5.67 E element(); 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Retrieves, but does not remove, the head of this queue, 17.53/5.67 * or returns null if this queue is empty. 17.53/5.67 * 17.53/5.67 * @return the head of this queue, or null if this queue is empty 17.53/5.67 */ 17.53/5.67 E peek(); 17.53/5.67 } 17.53/5.67 17.53/5.67 17.53/5.67 /* 17.53/5.67 * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.67 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.67 * 17.53/5.67 * This code is free software; you can redistribute it and/or modify it 17.53/5.67 * under the terms of the GNU General Public License version 2 only, as 17.53/5.67 * published by the Free Software Foundation. Sun designates this 17.53/5.67 * particular file as subject to the "Classpath" exception as provided 17.53/5.67 * by Sun in the LICENSE file that accompanied this code. 17.53/5.67 * 17.53/5.67 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.67 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.67 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.67 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.67 * accompanied this code). 17.53/5.67 * 17.53/5.67 * You should have received a copy of the GNU General Public License version 17.53/5.67 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.67 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.67 * 17.53/5.67 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.67 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.67 * have any questions. 17.53/5.67 */ 17.53/5.67 17.53/5.67 package javaUtilEx; 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Marker interface used by List implementations to indicate that 17.53/5.67 * they support fast (generally constant time) random access. The primary 17.53/5.67 * purpose of this interface is to allow generic algorithms to alter their 17.53/5.67 * behavior to provide good performance when applied to either random or 17.53/5.67 * sequential access lists. 17.53/5.67 * 17.53/5.67 *

The best algorithms for manipulating random access lists (such as 17.53/5.67 * ArrayList) can produce quadratic behavior when applied to 17.53/5.67 * sequential access lists (such as LinkedList). Generic list 17.53/5.67 * algorithms are encouraged to check whether the given list is an 17.53/5.67 * instanceof this interface before applying an algorithm that would 17.53/5.67 * provide poor performance if it were applied to a sequential access list, 17.53/5.67 * and to alter their behavior if necessary to guarantee acceptable 17.53/5.67 * performance. 17.53/5.67 * 17.53/5.67 *

It is recognized that the distinction between random and sequential 17.53/5.67 * access is often fuzzy. For example, some List implementations 17.53/5.67 * provide asymptotically linear access times if they get huge, but constant 17.53/5.67 * access times in practice. Such a List implementation 17.53/5.67 * should generally implement this interface. As a rule of thumb, a 17.53/5.67 * List implementation should implement this interface if, 17.53/5.67 * for typical instances of the class, this loop: 17.53/5.67 *

17.53/5.67	 *     for (int i=0, n=list.size(); i < n; i++)
17.53/5.67	 *         list.get(i);
17.53/5.67	 * 
17.53/5.67 * runs faster than this loop: 17.53/5.67 *
17.53/5.67	 *     for (Iterator i=list.iterator(); i.hasNext(); )
17.53/5.67	 *         i.next();
17.53/5.67	 * 
17.53/5.67 * 17.53/5.67 *

This interface is a member of the 17.53/5.67 * 17.53/5.67 * Java Collections Framework. 17.53/5.67 * 17.53/5.67 * @since 1.4 17.53/5.67 */ 17.53/5.67 public interface RandomAccess { 17.53/5.67 } 17.53/5.67 17.53/5.67 17.53/5.67 package javaUtilEx; 17.53/5.67 17.53/5.67 public class Random { 17.53/5.67 static String[] args; 17.53/5.67 static int index = 0; 17.53/5.67 17.53/5.67 public static int random() { 17.53/5.67 String string = args[index]; 17.53/5.67 index++; 17.53/5.67 return string.length(); 17.53/5.67 } 17.53/5.67 } 17.53/5.67 17.53/5.67 17.53/5.67 /* 17.53/5.67 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.67 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.67 * 17.53/5.67 * This code is free software; you can redistribute it and/or modify it 17.53/5.67 * under the terms of the GNU General Public License version 2 only, as 17.53/5.67 * published by the Free Software Foundation. Sun designates this 17.53/5.67 * particular file as subject to the "Classpath" exception as provided 17.53/5.67 * by Sun in the LICENSE file that accompanied this code. 17.53/5.67 * 17.53/5.67 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.67 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.67 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.67 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.67 * accompanied this code). 17.53/5.67 * 17.53/5.67 * You should have received a copy of the GNU General Public License version 17.53/5.67 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.67 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.67 * 17.53/5.67 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.67 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.67 * have any questions. 17.53/5.67 */ 17.53/5.67 17.53/5.67 package javaUtilEx; 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Thrown to indicate that the requested operation is not supported.

17.53/5.67 * 17.53/5.67 * This class is a member of the 17.53/5.67 * 17.53/5.67 * Java Collections Framework. 17.53/5.67 * 17.53/5.67 * @author Josh Bloch 17.53/5.67 * @since 1.2 17.53/5.67 */ 17.53/5.67 public class UnsupportedOperationException extends RuntimeException { 17.53/5.67 /** 17.53/5.67 * Constructs an UnsupportedOperationException with no detail message. 17.53/5.67 */ 17.53/5.67 public UnsupportedOperationException() { 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Constructs an UnsupportedOperationException with the specified 17.53/5.67 * detail message. 17.53/5.67 * 17.53/5.67 * @param message the detail message 17.53/5.67 */ 17.53/5.67 public UnsupportedOperationException(String message) { 17.53/5.67 super(message); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Constructs a new exception with the specified detail message and 17.53/5.67 * cause. 17.53/5.67 * 17.53/5.67 *

Note that the detail message associated with cause is 17.53/5.67 * not automatically incorporated in this exception's detail 17.53/5.67 * message. 17.53/5.67 * 17.53/5.67 * @param message the detail message (which is saved for later retrieval 17.53/5.67 * by the {@link Throwable#getMessage()} method). 17.53/5.67 * @param cause the cause (which is saved for later retrieval by the 17.53/5.67 * {@link Throwable#getCause()} method). (A null value 17.53/5.67 * is permitted, and indicates that the cause is nonexistent or 17.53/5.67 * unknown.) 17.53/5.67 * @since 1.5 17.53/5.67 */ 17.53/5.67 public UnsupportedOperationException(String message, Throwable cause) { 17.53/5.67 super(message, cause); 17.53/5.67 } 17.53/5.67 17.53/5.67 /** 17.53/5.67 * Constructs a new exception with the specified cause and a detail 17.53/5.67 * message of (cause==null ? null : cause.toString()) (which 17.53/5.67 * typically contains the class and detail message of cause). 17.53/5.67 * This constructor is useful for exceptions that are little more than 17.53/5.67 * wrappers for other throwables (for example, {@link 17.53/5.67 * java.security.PrivilegedActionException}). 17.53/5.67 * 17.53/5.67 * @param cause the cause (which is saved for later retrieval by the 17.53/5.67 * {@link Throwable#getCause()} method). (A null value is 17.53/5.67 * permitted, and indicates that the cause is nonexistent or 17.53/5.67 * unknown.) 17.53/5.67 * @since 1.5 17.53/5.67 */ 17.53/5.67 public UnsupportedOperationException(Throwable cause) { 17.53/5.67 super(cause); 17.53/5.67 } 17.53/5.67 17.53/5.67 static final long serialVersionUID = -1242599979055084673L; 17.53/5.67 } 17.53/5.67 17.53/5.67 17.53/5.67 17.53/5.67 ---------------------------------------- 17.53/5.67 17.53/5.67 (1) BareJBCToJBCProof (EQUIVALENT) 17.53/5.67 initialized classpath 17.53/5.67 ---------------------------------------- 17.53/5.67 17.53/5.67 (2) 17.53/5.67 Obligation: 17.53/5.67 need to prove termination of the following program: 17.53/5.67 /* 17.53/5.67 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.67 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.67 * 17.53/5.67 * This code is free software; you can redistribute it and/or modify it 17.53/5.67 * under the terms of the GNU General Public License version 2 only, as 17.53/5.67 * published by the Free Software Foundation. Sun designates this 17.53/5.67 * particular file as subject to the "Classpath" exception as provided 17.53/5.67 * by Sun in the LICENSE file that accompanied this code. 17.53/5.67 * 17.53/5.67 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.68 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.68 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.68 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.68 * accompanied this code). 17.53/5.68 * 17.53/5.68 * You should have received a copy of the GNU General Public License version 17.53/5.68 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.68 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.68 * 17.53/5.68 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.68 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.68 * have any questions. 17.53/5.68 */ 17.53/5.68 17.53/5.68 package javaUtilEx; 17.53/5.68 17.53/5.68 /** 17.53/5.68 * This class provides a skeletal implementation of the Collection 17.53/5.68 * interface, to minimize the effort required to implement this interface.

17.53/5.68 * 17.53/5.68 * To implement an unmodifiable collection, the programmer needs only to 17.53/5.68 * extend this class and provide implementations for the iterator and 17.53/5.68 * size methods. (The iterator returned by the iterator 17.53/5.68 * method must implement hasNext and next.)

17.53/5.68 * 17.53/5.68 * To implement a modifiable collection, the programmer must additionally 17.53/5.68 * override this class's add method (which otherwise throws an 17.53/5.68 * UnsupportedOperationException), and the iterator returned by the 17.53/5.68 * iterator method must additionally implement its remove 17.53/5.68 * method.

17.53/5.68 * 17.53/5.68 * The programmer should generally provide a void (no argument) and 17.53/5.68 * Collection constructor, as per the recommendation in the 17.53/5.68 * Collection interface specification.

17.53/5.68 * 17.53/5.68 * The documentation for each non-abstract method in this class describes its 17.53/5.68 * implementation in detail. Each of these methods may be overridden if 17.53/5.68 * the collection being implemented admits a more efficient implementation.

17.53/5.68 * 17.53/5.68 * This class is a member of the 17.53/5.68 * 17.53/5.68 * Java Collections Framework. 17.53/5.68 * 17.53/5.68 * @author Josh Bloch 17.53/5.68 * @author Neal Gafter 17.53/5.68 * @see Collection 17.53/5.68 * @since 1.2 17.53/5.68 */ 17.53/5.68 17.53/5.68 public abstract class AbstractCollection implements Collection { 17.53/5.68 /** 17.53/5.68 * Sole constructor. (For invocation by subclass constructors, typically 17.53/5.68 * implicit.) 17.53/5.68 */ 17.53/5.68 protected AbstractCollection() { 17.53/5.68 } 17.53/5.68 17.53/5.68 // Query Operations 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns an iterator over the elements contained in this collection. 17.53/5.68 * 17.53/5.68 * @return an iterator over the elements contained in this collection 17.53/5.68 */ 17.53/5.68 public abstract Iterator iterator(); 17.53/5.68 17.53/5.68 public abstract int size(); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation returns size() == 0. 17.53/5.68 */ 17.53/5.68 public boolean isEmpty() { 17.53/5.68 return size() == 0; 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation iterates over the elements in the collection, 17.53/5.68 * checking each element in turn for equality with the specified element. 17.53/5.68 * 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public boolean contains(Object o) { 17.53/5.68 Iterator e = iterator(); 17.53/5.68 if (o==null) { 17.53/5.68 while (e.hasNext()) 17.53/5.68 if (e.next()==null) 17.53/5.68 return true; 17.53/5.68 } else { 17.53/5.68 while (e.hasNext()) 17.53/5.68 if (o.equals(e.next())) 17.53/5.68 return true; 17.53/5.68 } 17.53/5.68 return false; 17.53/5.68 } 17.53/5.68 17.53/5.68 // Modification Operations 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation always throws an 17.53/5.68 * UnsupportedOperationException. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.68 * @throws IllegalStateException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public boolean add(E e) { 17.53/5.68 throw new UnsupportedOperationException(); 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation iterates over the collection looking for the 17.53/5.68 * specified element. If it finds the element, it removes the element 17.53/5.68 * from the collection using the iterator's remove method. 17.53/5.68 * 17.53/5.68 *

Note that this implementation throws an 17.53/5.68 * UnsupportedOperationException if the iterator returned by this 17.53/5.68 * collection's iterator method does not implement the remove 17.53/5.68 * method and this collection contains the specified object. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public boolean remove(Object o) { 17.53/5.68 Iterator e = iterator(); 17.53/5.68 if (o==null) { 17.53/5.68 while (e.hasNext()) { 17.53/5.68 if (e.next()==null) { 17.53/5.68 e.remove(); 17.53/5.68 return true; 17.53/5.68 } 17.53/5.68 } 17.53/5.68 } else { 17.53/5.68 while (e.hasNext()) { 17.53/5.68 if (o.equals(e.next())) { 17.53/5.68 e.remove(); 17.53/5.68 return true; 17.53/5.68 } 17.53/5.68 } 17.53/5.68 } 17.53/5.68 return false; 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 // Bulk Operations 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation iterates over the specified collection, 17.53/5.68 * checking each element returned by the iterator in turn to see 17.53/5.68 * if it's contained in this collection. If all elements are so 17.53/5.68 * contained true is returned, otherwise false. 17.53/5.68 * 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 * @see #contains(Object) 17.53/5.68 */ 17.53/5.68 public boolean containsAll(Collection c) { 17.53/5.68 Iterator e = c.iterator(); 17.53/5.68 while (e.hasNext()) 17.53/5.68 if (!contains(e.next())) 17.53/5.68 return false; 17.53/5.68 return true; 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation iterates over the specified collection, and adds 17.53/5.68 * each object returned by the iterator to this collection, in turn. 17.53/5.68 * 17.53/5.68 *

Note that this implementation will throw an 17.53/5.68 * UnsupportedOperationException unless add is 17.53/5.68 * overridden (assuming the specified collection is non-empty). 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.68 * @throws IllegalStateException {@inheritDoc} 17.53/5.68 * 17.53/5.68 * @see #add(Object) 17.53/5.68 */ 17.53/5.68 public boolean addAll(Collection c) { 17.53/5.68 boolean modified = false; 17.53/5.68 Iterator e = c.iterator(); 17.53/5.68 while (e.hasNext()) { 17.53/5.68 if (add(e.next())) 17.53/5.68 modified = true; 17.53/5.68 } 17.53/5.68 return modified; 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation iterates over this collection, checking each 17.53/5.68 * element returned by the iterator in turn to see if it's contained 17.53/5.68 * in the specified collection. If it's so contained, it's removed from 17.53/5.68 * this collection with the iterator's remove method. 17.53/5.68 * 17.53/5.68 *

Note that this implementation will throw an 17.53/5.68 * UnsupportedOperationException if the iterator returned by the 17.53/5.68 * iterator method does not implement the remove method 17.53/5.68 * and this collection contains one or more elements in common with the 17.53/5.68 * specified collection. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 * 17.53/5.68 * @see #remove(Object) 17.53/5.68 * @see #contains(Object) 17.53/5.68 */ 17.53/5.68 public boolean removeAll(Collection c) { 17.53/5.68 boolean modified = false; 17.53/5.68 Iterator e = iterator(); 17.53/5.68 while (e.hasNext()) { 17.53/5.68 if (c.contains(e.next())) { 17.53/5.68 e.remove(); 17.53/5.68 modified = true; 17.53/5.68 } 17.53/5.68 } 17.53/5.68 return modified; 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation iterates over this collection, checking each 17.53/5.68 * element returned by the iterator in turn to see if it's contained 17.53/5.68 * in the specified collection. If it's not so contained, it's removed 17.53/5.68 * from this collection with the iterator's remove method. 17.53/5.68 * 17.53/5.68 *

Note that this implementation will throw an 17.53/5.68 * UnsupportedOperationException if the iterator returned by the 17.53/5.68 * iterator method does not implement the remove method 17.53/5.68 * and this collection contains one or more elements not present in the 17.53/5.68 * specified collection. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 * 17.53/5.68 * @see #remove(Object) 17.53/5.68 * @see #contains(Object) 17.53/5.68 */ 17.53/5.68 public boolean retainAll(Collection c) { 17.53/5.68 boolean modified = false; 17.53/5.68 Iterator e = iterator(); 17.53/5.68 while (e.hasNext()) { 17.53/5.68 if (!c.contains(e.next())) { 17.53/5.68 e.remove(); 17.53/5.68 modified = true; 17.53/5.68 } 17.53/5.68 } 17.53/5.68 return modified; 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation iterates over this collection, removing each 17.53/5.68 * element using the Iterator.remove operation. Most 17.53/5.68 * implementations will probably choose to override this method for 17.53/5.68 * efficiency. 17.53/5.68 * 17.53/5.68 *

Note that this implementation will throw an 17.53/5.68 * UnsupportedOperationException if the iterator returned by this 17.53/5.68 * collection's iterator method does not implement the 17.53/5.68 * remove method and this collection is non-empty. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public void clear() { 17.53/5.68 Iterator e = iterator(); 17.53/5.68 while (e.hasNext()) { 17.53/5.68 e.next(); 17.53/5.68 e.remove(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 // String conversion 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns a string representation of this collection. The string 17.53/5.68 * representation consists of a list of the collection's elements in the 17.53/5.68 * order they are returned by its iterator, enclosed in square brackets 17.53/5.68 * ("[]"). Adjacent elements are separated by the characters 17.53/5.68 * ", " (comma and space). Elements are converted to strings as 17.53/5.68 * by {@link String#valueOf(Object)}. 17.53/5.68 * 17.53/5.68 * @return a string representation of this collection 17.53/5.68 */ 17.53/5.68 public String toString() { 17.53/5.68 Iterator i = iterator(); 17.53/5.68 if (! i.hasNext()) 17.53/5.68 return "[]"; 17.53/5.68 17.53/5.68 String sb = ""; 17.53/5.68 sb = sb + "["; 17.53/5.68 for (;;) { 17.53/5.68 E e = i.next(); 17.53/5.68 sb = sb + (e == this ? "(this Collection)" : e); 17.53/5.68 if (! i.hasNext()) { 17.53/5.68 sb = sb + "]"; 17.53/5.68 return sb; 17.53/5.68 } 17.53/5.68 sb = sb + ", "; 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 /* 17.53/5.68 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.68 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.68 * 17.53/5.68 * This code is free software; you can redistribute it and/or modify it 17.53/5.68 * under the terms of the GNU General Public License version 2 only, as 17.53/5.68 * published by the Free Software Foundation. Sun designates this 17.53/5.68 * particular file as subject to the "Classpath" exception as provided 17.53/5.68 * by Sun in the LICENSE file that accompanied this code. 17.53/5.68 * 17.53/5.68 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.68 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.68 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.68 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.68 * accompanied this code). 17.53/5.68 * 17.53/5.68 * You should have received a copy of the GNU General Public License version 17.53/5.68 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.68 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.68 * 17.53/5.68 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.68 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.68 * have any questions. 17.53/5.68 */ 17.53/5.68 17.53/5.68 package javaUtilEx; 17.53/5.68 17.53/5.68 /** 17.53/5.68 * This class provides a skeletal implementation of the {@link List} 17.53/5.68 * interface to minimize the effort required to implement this interface 17.53/5.68 * backed by a "random access" data store (such as an array). For sequential 17.53/5.68 * access data (such as a linked list), {@link AbstractSequentialList} should 17.53/5.68 * be used in preference to this class. 17.53/5.68 * 17.53/5.68 *

To implement an unmodifiable list, the programmer needs only to extend 17.53/5.68 * this class and provide implementations for the {@link #get(int)} and 17.53/5.68 * {@link List#size() size()} methods. 17.53/5.68 * 17.53/5.68 *

To implement a modifiable list, the programmer must additionally 17.53/5.68 * override the {@link #set(int, Object) set(int, E)} method (which otherwise 17.53/5.68 * throws an {@code UnsupportedOperationException}). If the list is 17.53/5.68 * variable-size the programmer must additionally override the 17.53/5.68 * {@link #add(int, Object) add(int, E)} and {@link #remove(int)} methods. 17.53/5.68 * 17.53/5.68 *

The programmer should generally provide a void (no argument) and collection 17.53/5.68 * constructor, as per the recommendation in the {@link Collection} interface 17.53/5.68 * specification. 17.53/5.68 * 17.53/5.68 *

Unlike the other abstract collection implementations, the programmer does 17.53/5.68 * not have to provide an iterator implementation; the iterator and 17.53/5.68 * list iterator are implemented by this class, on top of the "random access" 17.53/5.68 * methods: 17.53/5.68 * {@link #get(int)}, 17.53/5.68 * {@link #set(int, Object) set(int, E)}, 17.53/5.68 * {@link #add(int, Object) add(int, E)} and 17.53/5.68 * {@link #remove(int)}. 17.53/5.68 * 17.53/5.68 *

The documentation for each non-abstract method in this class describes its 17.53/5.68 * implementation in detail. Each of these methods may be overridden if the 17.53/5.68 * collection being implemented admits a more efficient implementation. 17.53/5.68 * 17.53/5.68 *

This class is a member of the 17.53/5.68 * 17.53/5.68 * Java Collections Framework. 17.53/5.68 * 17.53/5.68 * @author Josh Bloch 17.53/5.68 * @author Neal Gafter 17.53/5.68 * @since 1.2 17.53/5.68 */ 17.53/5.68 17.53/5.68 public abstract class AbstractList extends AbstractCollection implements List { 17.53/5.68 /** 17.53/5.68 * Sole constructor. (For invocation by subclass constructors, typically 17.53/5.68 * implicit.) 17.53/5.68 */ 17.53/5.68 protected AbstractList() { 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Appends the specified element to the end of this list (optional 17.53/5.68 * operation). 17.53/5.68 * 17.53/5.68 *

Lists that support this operation may place limitations on what 17.53/5.68 * elements may be added to this list. In particular, some 17.53/5.68 * lists will refuse to add null elements, and others will impose 17.53/5.68 * restrictions on the type of elements that may be added. List 17.53/5.68 * classes should clearly specify in their documentation any restrictions 17.53/5.68 * on what elements may be added. 17.53/5.68 * 17.53/5.68 *

This implementation calls {@code add(size(), e)}. 17.53/5.68 * 17.53/5.68 *

Note that this implementation throws an 17.53/5.68 * {@code UnsupportedOperationException} unless 17.53/5.68 * {@link #add(int, Object) add(int, E)} is overridden. 17.53/5.68 * 17.53/5.68 * @param e element to be appended to this list 17.53/5.68 * @return {@code true} (as specified by {@link Collection#add}) 17.53/5.68 * @throws UnsupportedOperationException if the {@code add} operation 17.53/5.68 * is not supported by this list 17.53/5.68 * @throws ClassCastException if the class of the specified element 17.53/5.68 * prevents it from being added to this list 17.53/5.68 * @throws NullPointerException if the specified element is null and this 17.53/5.68 * list does not permit null elements 17.53/5.68 * @throws IllegalArgumentException if some property of this element 17.53/5.68 * prevents it from being added to this list 17.53/5.68 */ 17.53/5.68 public boolean add(E e) { 17.53/5.68 add(size(), e); 17.53/5.68 return true; 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 abstract public E get(int index); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation always throws an 17.53/5.68 * {@code UnsupportedOperationException}. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public E set(int index, E element) { 17.53/5.68 throw new UnsupportedOperationException(); 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation always throws an 17.53/5.68 * {@code UnsupportedOperationException}. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public void add(int index, E element) { 17.53/5.68 throw new UnsupportedOperationException(); 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation always throws an 17.53/5.68 * {@code UnsupportedOperationException}. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public E remove(int index) { 17.53/5.68 throw new UnsupportedOperationException(); 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 // Search Operations 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation first gets a list iterator (with 17.53/5.68 * {@code listIterator()}). Then, it iterates over the list until the 17.53/5.68 * specified element is found or the end of the list is reached. 17.53/5.68 * 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public int indexOf(Object o) { 17.53/5.68 ListIterator e = listIterator(); 17.53/5.68 if (o==null) { 17.53/5.68 while (e.hasNext()) 17.53/5.68 if (e.next()==null) 17.53/5.68 return e.previousIndex(); 17.53/5.68 } else { 17.53/5.68 while (e.hasNext()) 17.53/5.68 if (o.equals(e.next())) 17.53/5.68 return e.previousIndex(); 17.53/5.68 } 17.53/5.68 return -1; 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation first gets a list iterator that points to the end 17.53/5.68 * of the list (with {@code listIterator(size())}). Then, it iterates 17.53/5.68 * backwards over the list until the specified element is found, or the 17.53/5.68 * beginning of the list is reached. 17.53/5.68 * 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public int lastIndexOf(Object o) { 17.53/5.68 ListIterator e = listIterator(size()); 17.53/5.68 if (o==null) { 17.53/5.68 while (e.hasPrevious()) 17.53/5.68 if (e.previous()==null) 17.53/5.68 return e.nextIndex(); 17.53/5.68 } else { 17.53/5.68 while (e.hasPrevious()) 17.53/5.68 if (o.equals(e.previous())) 17.53/5.68 return e.nextIndex(); 17.53/5.68 } 17.53/5.68 return -1; 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 // Bulk Operations 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Removes all of the elements from this list (optional operation). 17.53/5.68 * The list will be empty after this call returns. 17.53/5.68 * 17.53/5.68 *

This implementation calls {@code removeRange(0, size())}. 17.53/5.68 * 17.53/5.68 *

Note that this implementation throws an 17.53/5.68 * {@code UnsupportedOperationException} unless {@code remove(int 17.53/5.68 * index)} or {@code removeRange(int fromIndex, int toIndex)} is 17.53/5.68 * overridden. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException if the {@code clear} operation 17.53/5.68 * is not supported by this list 17.53/5.68 */ 17.53/5.68 public void clear() { 17.53/5.68 removeRange(0, size()); 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation gets an iterator over the specified collection 17.53/5.68 * and iterates over it, inserting the elements obtained from the 17.53/5.68 * iterator into this list at the appropriate position, one at a time, 17.53/5.68 * using {@code add(int, E)}. 17.53/5.68 * Many implementations will override this method for efficiency. 17.53/5.68 * 17.53/5.68 *

Note that this implementation throws an 17.53/5.68 * {@code UnsupportedOperationException} unless 17.53/5.68 * {@link #add(int, Object) add(int, E)} is overridden. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public boolean addAll(int index, Collection c) { 17.53/5.68 rangeCheckForAdd(index); 17.53/5.68 boolean modified = false; 17.53/5.68 Iterator e = c.iterator(); 17.53/5.68 while (e.hasNext()) { 17.53/5.68 add(index++, e.next()); 17.53/5.68 modified = true; 17.53/5.68 } 17.53/5.68 return modified; 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 // Iterators 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns an iterator over the elements in this list in proper sequence. 17.53/5.68 * 17.53/5.68 *

This implementation returns a straightforward implementation of the 17.53/5.68 * iterator interface, relying on the backing list's {@code size()}, 17.53/5.68 * {@code get(int)}, and {@code remove(int)} methods. 17.53/5.68 * 17.53/5.68 *

Note that the iterator returned by this method will throw an 17.53/5.68 * {@link UnsupportedOperationException} in response to its 17.53/5.68 * {@code remove} method unless the list's {@code remove(int)} method is 17.53/5.68 * overridden. 17.53/5.68 * 17.53/5.68 *

This implementation can be made to throw runtime exceptions in the 17.53/5.68 * face of concurrent modification, as described in the specification 17.53/5.68 * for the (protected) {@link #modCount} field. 17.53/5.68 * 17.53/5.68 * @return an iterator over the elements in this list in proper sequence 17.53/5.68 */ 17.53/5.68 public Iterator iterator() { 17.53/5.68 return new Itr(); 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation returns {@code listIterator(0)}. 17.53/5.68 * 17.53/5.68 * @see #listIterator(int) 17.53/5.68 */ 17.53/5.68 public ListIterator listIterator() { 17.53/5.68 return listIterator(0); 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation returns a straightforward implementation of the 17.53/5.68 * {@code ListIterator} interface that extends the implementation of the 17.53/5.68 * {@code Iterator} interface returned by the {@code iterator()} method. 17.53/5.68 * The {@code ListIterator} implementation relies on the backing list's 17.53/5.68 * {@code get(int)}, {@code set(int, E)}, {@code add(int, E)} 17.53/5.68 * and {@code remove(int)} methods. 17.53/5.68 * 17.53/5.68 *

Note that the list iterator returned by this implementation will 17.53/5.68 * throw an {@link UnsupportedOperationException} in response to its 17.53/5.68 * {@code remove}, {@code set} and {@code add} methods unless the 17.53/5.68 * list's {@code remove(int)}, {@code set(int, E)}, and 17.53/5.68 * {@code add(int, E)} methods are overridden. 17.53/5.68 * 17.53/5.68 *

This implementation can be made to throw runtime exceptions in the 17.53/5.68 * face of concurrent modification, as described in the specification for 17.53/5.68 * the (protected) {@link #modCount} field. 17.53/5.68 * 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public ListIterator listIterator(final int index) { 17.53/5.68 rangeCheckForAdd(index); 17.53/5.68 17.53/5.68 return new ListItr(index); 17.53/5.68 } 17.53/5.68 17.53/5.68 private class Itr implements Iterator { 17.53/5.68 /** 17.53/5.68 * Index of element to be returned by subsequent call to next. 17.53/5.68 */ 17.53/5.68 int cursor = 0; 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Index of element returned by most recent call to next or 17.53/5.68 * previous. Reset to -1 if this element is deleted by a call 17.53/5.68 * to remove. 17.53/5.68 */ 17.53/5.68 int lastRet = -1; 17.53/5.68 17.53/5.68 /** 17.53/5.68 * The modCount value that the iterator believes that the backing 17.53/5.68 * List should have. If this expectation is violated, the iterator 17.53/5.68 * has detected concurrent modification. 17.53/5.68 */ 17.53/5.68 int expectedModCount = modCount; 17.53/5.68 17.53/5.68 public boolean hasNext() { 17.53/5.68 return cursor != size(); 17.53/5.68 } 17.53/5.68 17.53/5.68 public E next() { 17.53/5.68 checkForComodification(); 17.53/5.68 try { 17.53/5.68 int i = cursor; 17.53/5.68 E next = get(i); 17.53/5.68 lastRet = i; 17.53/5.68 cursor = i + 1; 17.53/5.68 return next; 17.53/5.68 } catch (IndexOutOfBoundsException e) { 17.53/5.68 checkForComodification(); 17.53/5.68 throw new NoSuchElementException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 public void remove() { 17.53/5.68 if (lastRet < 0) 17.53/5.68 throw new IllegalStateException(); 17.53/5.68 checkForComodification(); 17.53/5.68 17.53/5.68 try { 17.53/5.68 AbstractList.this.remove(lastRet); 17.53/5.68 if (lastRet < cursor) 17.53/5.68 cursor--; 17.53/5.68 lastRet = -1; 17.53/5.68 expectedModCount = modCount; 17.53/5.68 } catch (IndexOutOfBoundsException e) { 17.53/5.68 throw new ConcurrentModificationException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 final void checkForComodification() { 17.53/5.68 if (modCount != expectedModCount) 17.53/5.68 throw new ConcurrentModificationException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 private class ListItr extends Itr implements ListIterator { 17.53/5.68 ListItr(int index) { 17.53/5.68 cursor = index; 17.53/5.68 } 17.53/5.68 17.53/5.68 public boolean hasPrevious() { 17.53/5.68 return cursor != 0; 17.53/5.68 } 17.53/5.68 17.53/5.68 public E previous() { 17.53/5.68 checkForComodification(); 17.53/5.68 try { 17.53/5.68 int i = cursor - 1; 17.53/5.68 E previous = get(i); 17.53/5.68 lastRet = cursor = i; 17.53/5.68 return previous; 17.53/5.68 } catch (IndexOutOfBoundsException e) { 17.53/5.68 checkForComodification(); 17.53/5.68 throw new NoSuchElementException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 public int nextIndex() { 17.53/5.68 return cursor; 17.53/5.68 } 17.53/5.68 17.53/5.68 public int previousIndex() { 17.53/5.68 return cursor-1; 17.53/5.68 } 17.53/5.68 17.53/5.68 public void set(E e) { 17.53/5.68 if (lastRet < 0) 17.53/5.68 throw new IllegalStateException(); 17.53/5.68 checkForComodification(); 17.53/5.68 17.53/5.68 try { 17.53/5.68 AbstractList.this.set(lastRet, e); 17.53/5.68 expectedModCount = modCount; 17.53/5.68 } catch (IndexOutOfBoundsException ex) { 17.53/5.68 throw new ConcurrentModificationException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 public void add(E e) { 17.53/5.68 checkForComodification(); 17.53/5.68 17.53/5.68 try { 17.53/5.68 int i = cursor; 17.53/5.68 AbstractList.this.add(i, e); 17.53/5.68 lastRet = -1; 17.53/5.68 cursor = i + 1; 17.53/5.68 expectedModCount = modCount; 17.53/5.68 } catch (IndexOutOfBoundsException ex) { 17.53/5.68 throw new ConcurrentModificationException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * {@inheritDoc} 17.53/5.68 * 17.53/5.68 *

This implementation returns a list that subclasses 17.53/5.68 * {@code AbstractList}. The subclass stores, in private fields, the 17.53/5.68 * offset of the subList within the backing list, the size of the subList 17.53/5.68 * (which can change over its lifetime), and the expected 17.53/5.68 * {@code modCount} value of the backing list. There are two variants 17.53/5.68 * of the subclass, one of which implements {@code RandomAccess}. 17.53/5.68 * If this list implements {@code RandomAccess} the returned list will 17.53/5.68 * be an instance of the subclass that implements {@code RandomAccess}. 17.53/5.68 * 17.53/5.68 *

The subclass's {@code set(int, E)}, {@code get(int)}, 17.53/5.68 * {@code add(int, E)}, {@code remove(int)}, {@code addAll(int, 17.53/5.68 * Collection)} and {@code removeRange(int, int)} methods all 17.53/5.68 * delegate to the corresponding methods on the backing abstract list, 17.53/5.68 * after bounds-checking the index and adjusting for the offset. The 17.53/5.68 * {@code addAll(Collection c)} method merely returns {@code addAll(size, 17.53/5.68 * c)}. 17.53/5.68 * 17.53/5.68 *

The {@code listIterator(int)} method returns a "wrapper object" 17.53/5.68 * over a list iterator on the backing list, which is created with the 17.53/5.68 * corresponding method on the backing list. The {@code iterator} method 17.53/5.68 * merely returns {@code listIterator()}, and the {@code size} method 17.53/5.68 * merely returns the subclass's {@code size} field. 17.53/5.68 * 17.53/5.68 *

All methods first check to see if the actual {@code modCount} of 17.53/5.68 * the backing list is equal to its expected value, and throw a 17.53/5.68 * {@code ConcurrentModificationException} if it is not. 17.53/5.68 * 17.53/5.68 * @throws IndexOutOfBoundsException if an endpoint index value is out of range 17.53/5.68 * {@code (fromIndex < 0 || toIndex > size)} 17.53/5.68 * @throws IllegalArgumentException if the endpoint indices are out of order 17.53/5.68 * {@code (fromIndex > toIndex)} 17.53/5.68 */ 17.53/5.68 public List subList(int fromIndex, int toIndex) { 17.53/5.68 return (this instanceof RandomAccess ? 17.53/5.68 new RandomAccessSubList(this, fromIndex, toIndex) : 17.53/5.68 new SubList(this, fromIndex, toIndex)); 17.53/5.68 } 17.53/5.68 17.53/5.68 // Comparison and hashing 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Compares the specified object with this list for equality. Returns 17.53/5.68 * {@code true} if and only if the specified object is also a list, both 17.53/5.68 * lists have the same size, and all corresponding pairs of elements in 17.53/5.68 * the two lists are equal. (Two elements {@code e1} and 17.53/5.68 * {@code e2} are equal if {@code (e1==null ? e2==null : 17.53/5.68 * e1.equals(e2))}.) In other words, two lists are defined to be 17.53/5.68 * equal if they contain the same elements in the same order.

17.53/5.68 * 17.53/5.68 * This implementation first checks if the specified object is this 17.53/5.68 * list. If so, it returns {@code true}; if not, it checks if the 17.53/5.68 * specified object is a list. If not, it returns {@code false}; if so, 17.53/5.68 * it iterates over both lists, comparing corresponding pairs of elements. 17.53/5.68 * If any comparison returns {@code false}, this method returns 17.53/5.68 * {@code false}. If either iterator runs out of elements before the 17.53/5.68 * other it returns {@code false} (as the lists are of unequal length); 17.53/5.68 * otherwise it returns {@code true} when the iterations complete. 17.53/5.68 * 17.53/5.68 * @param o the object to be compared for equality with this list 17.53/5.68 * @return {@code true} if the specified object is equal to this list 17.53/5.68 */ 17.53/5.68 public boolean equals(Object o) { 17.53/5.68 if (o == this) 17.53/5.68 return true; 17.53/5.68 if (!(o instanceof List)) 17.53/5.68 return false; 17.53/5.68 17.53/5.68 ListIterator e1 = listIterator(); 17.53/5.68 ListIterator e2 = ((List) o).listIterator(); 17.53/5.68 while(e1.hasNext() && e2.hasNext()) { 17.53/5.68 E o1 = e1.next(); 17.53/5.68 Object o2 = e2.next(); 17.53/5.68 if (!(o1==null ? o2==null : o1.equals(o2))) 17.53/5.68 return false; 17.53/5.68 } 17.53/5.68 return !(e1.hasNext() || e2.hasNext()); 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns the hash code value for this list. 17.53/5.68 * 17.53/5.68 *

This implementation uses exactly the code that is used to define the 17.53/5.68 * list hash function in the documentation for the {@link List#hashCode} 17.53/5.68 * method. 17.53/5.68 * 17.53/5.68 * @return the hash code value for this list 17.53/5.68 */ 17.53/5.68 public int hashCode() { 17.53/5.68 int hashCode = 1; 17.53/5.68 Iterator it = this.iterator(); 17.53/5.68 while (it.hasNext()) { 17.53/5.68 E e = it.next(); 17.53/5.68 hashCode = 31*hashCode + (e==null ? 0 : e.hashCode()); 17.53/5.68 } 17.53/5.68 return hashCode; 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Removes from this list all of the elements whose index is between 17.53/5.68 * {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. 17.53/5.68 * Shifts any succeeding elements to the left (reduces their index). 17.53/5.68 * This call shortens the list by {@code (toIndex - fromIndex)} elements. 17.53/5.68 * (If {@code toIndex==fromIndex}, this operation has no effect.) 17.53/5.68 * 17.53/5.68 *

This method is called by the {@code clear} operation on this list 17.53/5.68 * and its subLists. Overriding this method to take advantage of 17.53/5.68 * the internals of the list implementation can substantially 17.53/5.68 * improve the performance of the {@code clear} operation on this list 17.53/5.68 * and its subLists. 17.53/5.68 * 17.53/5.68 *

This implementation gets a list iterator positioned before 17.53/5.68 * {@code fromIndex}, and repeatedly calls {@code ListIterator.next} 17.53/5.68 * followed by {@code ListIterator.remove} until the entire range has 17.53/5.68 * been removed. Note: if {@code ListIterator.remove} requires linear 17.53/5.68 * time, this implementation requires quadratic time. 17.53/5.68 * 17.53/5.68 * @param fromIndex index of first element to be removed 17.53/5.68 * @param toIndex index after last element to be removed 17.53/5.68 */ 17.53/5.68 protected void removeRange(int fromIndex, int toIndex) { 17.53/5.68 ListIterator it = listIterator(fromIndex); 17.53/5.68 for (int i=0, n=toIndex-fromIndex; istructurally modified. 17.53/5.68 * Structural modifications are those that change the size of the 17.53/5.68 * list, or otherwise perturb it in such a fashion that iterations in 17.53/5.68 * progress may yield incorrect results. 17.53/5.68 * 17.53/5.68 *

This field is used by the iterator and list iterator implementation 17.53/5.68 * returned by the {@code iterator} and {@code listIterator} methods. 17.53/5.68 * If the value of this field changes unexpectedly, the iterator (or list 17.53/5.68 * iterator) will throw a {@code ConcurrentModificationException} in 17.53/5.68 * response to the {@code next}, {@code remove}, {@code previous}, 17.53/5.68 * {@code set} or {@code add} operations. This provides 17.53/5.68 * fail-fast behavior, rather than non-deterministic behavior in 17.53/5.68 * the face of concurrent modification during iteration. 17.53/5.68 * 17.53/5.68 *

Use of this field by subclasses is optional. If a subclass 17.53/5.68 * wishes to provide fail-fast iterators (and list iterators), then it 17.53/5.68 * merely has to increment this field in its {@code add(int, E)} and 17.53/5.68 * {@code remove(int)} methods (and any other methods that it overrides 17.53/5.68 * that result in structural modifications to the list). A single call to 17.53/5.68 * {@code add(int, E)} or {@code remove(int)} must add no more than 17.53/5.68 * one to this field, or the iterators (and list iterators) will throw 17.53/5.68 * bogus {@code ConcurrentModificationExceptions}. If an implementation 17.53/5.68 * does not wish to provide fail-fast iterators, this field may be 17.53/5.68 * ignored. 17.53/5.68 */ 17.53/5.68 protected transient int modCount = 0; 17.53/5.68 17.53/5.68 private void rangeCheckForAdd(int index) { 17.53/5.68 if (index < 0 || index > size()) 17.53/5.68 throw new IndexOutOfBoundsException(outOfBoundsMsg(index)); 17.53/5.68 } 17.53/5.68 17.53/5.68 private String outOfBoundsMsg(int index) { 17.53/5.68 return ""; 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 class SubList extends AbstractList { 17.53/5.68 private final AbstractList l; 17.53/5.68 private final int offset; 17.53/5.68 private int size; 17.53/5.68 17.53/5.68 SubList(AbstractList list, int fromIndex, int toIndex) { 17.53/5.68 if (fromIndex < 0) 17.53/5.68 throw new IndexOutOfBoundsException(); 17.53/5.68 if (toIndex > list.size()) 17.53/5.68 throw new IndexOutOfBoundsException(); 17.53/5.68 if (fromIndex > toIndex) 17.53/5.68 throw new IllegalArgumentException(); 17.53/5.68 l = list; 17.53/5.68 offset = fromIndex; 17.53/5.68 size = toIndex - fromIndex; 17.53/5.68 this.modCount = l.modCount; 17.53/5.68 } 17.53/5.68 17.53/5.68 public E set(int index, E element) { 17.53/5.68 rangeCheck(index); 17.53/5.68 checkForComodification(); 17.53/5.68 return l.set(index+offset, element); 17.53/5.68 } 17.53/5.68 17.53/5.68 public E get(int index) { 17.53/5.68 rangeCheck(index); 17.53/5.68 checkForComodification(); 17.53/5.68 return l.get(index+offset); 17.53/5.68 } 17.53/5.68 17.53/5.68 public int size() { 17.53/5.68 checkForComodification(); 17.53/5.68 return size; 17.53/5.68 } 17.53/5.68 17.53/5.68 public void add(int index, E element) { 17.53/5.68 rangeCheckForAdd(index); 17.53/5.68 checkForComodification(); 17.53/5.68 l.add(index+offset, element); 17.53/5.68 this.modCount = l.modCount; 17.53/5.68 size++; 17.53/5.68 } 17.53/5.68 17.53/5.68 public E remove(int index) { 17.53/5.68 rangeCheck(index); 17.53/5.68 checkForComodification(); 17.53/5.68 E result = l.remove(index+offset); 17.53/5.68 this.modCount = l.modCount; 17.53/5.68 size--; 17.53/5.68 return result; 17.53/5.68 } 17.53/5.68 17.53/5.68 protected void removeRange(int fromIndex, int toIndex) { 17.53/5.68 checkForComodification(); 17.53/5.68 l.removeRange(fromIndex+offset, toIndex+offset); 17.53/5.68 this.modCount = l.modCount; 17.53/5.68 size -= (toIndex-fromIndex); 17.53/5.68 } 17.53/5.68 17.53/5.68 public boolean addAll(Collection c) { 17.53/5.68 return addAll(size, c); 17.53/5.68 } 17.53/5.68 17.53/5.68 public boolean addAll(int index, Collection c) { 17.53/5.68 rangeCheckForAdd(index); 17.53/5.68 int cSize = c.size(); 17.53/5.68 if (cSize==0) 17.53/5.68 return false; 17.53/5.68 17.53/5.68 checkForComodification(); 17.53/5.68 l.addAll(offset+index, c); 17.53/5.68 this.modCount = l.modCount; 17.53/5.68 size += cSize; 17.53/5.68 return true; 17.53/5.68 } 17.53/5.68 17.53/5.68 public Iterator iterator() { 17.53/5.68 return listIterator(); 17.53/5.68 } 17.53/5.68 17.53/5.68 public ListIterator listIterator(final int index) { 17.53/5.68 checkForComodification(); 17.53/5.68 rangeCheckForAdd(index); 17.53/5.68 17.53/5.68 return new ListIterator() { 17.53/5.68 private final ListIterator i = l.listIterator(index+offset); 17.53/5.68 17.53/5.68 public boolean hasNext() { 17.53/5.68 return nextIndex() < size; 17.53/5.68 } 17.53/5.68 17.53/5.68 public E next() { 17.53/5.68 if (hasNext()) 17.53/5.68 return i.next(); 17.53/5.68 else 17.53/5.68 throw new NoSuchElementException(); 17.53/5.68 } 17.53/5.68 17.53/5.68 public boolean hasPrevious() { 17.53/5.68 return previousIndex() >= 0; 17.53/5.68 } 17.53/5.68 17.53/5.68 public E previous() { 17.53/5.68 if (hasPrevious()) 17.53/5.68 return i.previous(); 17.53/5.68 else 17.53/5.68 throw new NoSuchElementException(); 17.53/5.68 } 17.53/5.68 17.53/5.68 public int nextIndex() { 17.53/5.68 return i.nextIndex() - offset; 17.53/5.68 } 17.53/5.68 17.53/5.68 public int previousIndex() { 17.53/5.68 return i.previousIndex() - offset; 17.53/5.68 } 17.53/5.68 17.53/5.68 public void remove() { 17.53/5.68 i.remove(); 17.53/5.68 SubList.this.modCount = l.modCount; 17.53/5.68 size--; 17.53/5.68 } 17.53/5.68 17.53/5.68 public void set(E e) { 17.53/5.68 i.set(e); 17.53/5.68 } 17.53/5.68 17.53/5.68 public void add(E e) { 17.53/5.68 i.add(e); 17.53/5.68 SubList.this.modCount = l.modCount; 17.53/5.68 size++; 17.53/5.68 } 17.53/5.68 }; 17.53/5.68 } 17.53/5.68 17.53/5.68 public List subList(int fromIndex, int toIndex) { 17.53/5.68 return new SubList(this, fromIndex, toIndex); 17.53/5.68 } 17.53/5.68 17.53/5.68 private void rangeCheck(int index) { 17.53/5.68 if (index < 0 || index >= size) 17.53/5.68 throw new IndexOutOfBoundsException(outOfBoundsMsg(index)); 17.53/5.68 } 17.53/5.68 17.53/5.68 private void rangeCheckForAdd(int index) { 17.53/5.68 if (index < 0 || index > size) 17.53/5.68 throw new IndexOutOfBoundsException(outOfBoundsMsg(index)); 17.53/5.68 } 17.53/5.68 17.53/5.68 private String outOfBoundsMsg(int index) { 17.53/5.68 return ""; 17.53/5.68 } 17.53/5.68 17.53/5.68 private void checkForComodification() { 17.53/5.68 if (this.modCount != l.modCount) 17.53/5.68 throw new ConcurrentModificationException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 class RandomAccessSubList extends SubList implements RandomAccess { 17.53/5.68 RandomAccessSubList(AbstractList list, int fromIndex, int toIndex) { 17.53/5.68 super(list, fromIndex, toIndex); 17.53/5.68 } 17.53/5.68 17.53/5.68 public List subList(int fromIndex, int toIndex) { 17.53/5.68 return new RandomAccessSubList(this, fromIndex, toIndex); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 /* 17.53/5.68 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.68 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.68 * 17.53/5.68 * This code is free software; you can redistribute it and/or modify it 17.53/5.68 * under the terms of the GNU General Public License version 2 only, as 17.53/5.68 * published by the Free Software Foundation. Sun designates this 17.53/5.68 * particular file as subject to the "Classpath" exception as provided 17.53/5.68 * by Sun in the LICENSE file that accompanied this code. 17.53/5.68 * 17.53/5.68 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.68 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.68 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.68 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.68 * accompanied this code). 17.53/5.68 * 17.53/5.68 * You should have received a copy of the GNU General Public License version 17.53/5.68 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.68 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.68 * 17.53/5.68 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.68 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.68 * have any questions. 17.53/5.68 */ 17.53/5.68 17.53/5.68 package javaUtilEx; 17.53/5.68 17.53/5.68 /** 17.53/5.68 * This class provides a skeletal implementation of the List 17.53/5.68 * interface to minimize the effort required to implement this interface 17.53/5.68 * backed by a "sequential access" data store (such as a linked list). For 17.53/5.68 * random access data (such as an array), AbstractList should be used 17.53/5.68 * in preference to this class.

17.53/5.68 * 17.53/5.68 * This class is the opposite of the AbstractList class in the sense 17.53/5.68 * that it implements the "random access" methods (get(int index), 17.53/5.68 * set(int index, E element), add(int index, E element) and 17.53/5.68 * remove(int index)) on top of the list's list iterator, instead of 17.53/5.68 * the other way around.

17.53/5.68 * 17.53/5.68 * To implement a list the programmer needs only to extend this class and 17.53/5.68 * provide implementations for the listIterator and size 17.53/5.68 * methods. For an unmodifiable list, the programmer need only implement the 17.53/5.68 * list iterator's hasNext, next, hasPrevious, 17.53/5.68 * previous and index methods.

17.53/5.68 * 17.53/5.68 * For a modifiable list the programmer should additionally implement the list 17.53/5.68 * iterator's set method. For a variable-size list the programmer 17.53/5.68 * should additionally implement the list iterator's remove and 17.53/5.68 * add methods.

17.53/5.68 * 17.53/5.68 * The programmer should generally provide a void (no argument) and collection 17.53/5.68 * constructor, as per the recommendation in the Collection interface 17.53/5.68 * specification.

17.53/5.68 * 17.53/5.68 * This class is a member of the 17.53/5.68 * 17.53/5.68 * Java Collections Framework. 17.53/5.68 * 17.53/5.68 * @author Josh Bloch 17.53/5.68 * @author Neal Gafter 17.53/5.68 * @see Collection 17.53/5.68 * @see List 17.53/5.68 * @see AbstractList 17.53/5.68 * @see AbstractCollection 17.53/5.68 * @since 1.2 17.53/5.68 */ 17.53/5.68 17.53/5.68 public abstract class AbstractSequentialList extends AbstractList { 17.53/5.68 /** 17.53/5.68 * Sole constructor. (For invocation by subclass constructors, typically 17.53/5.68 * implicit.) 17.53/5.68 */ 17.53/5.68 protected AbstractSequentialList() { 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns the element at the specified position in this list. 17.53/5.68 * 17.53/5.68 *

This implementation first gets a list iterator pointing to the 17.53/5.68 * indexed element (with listIterator(index)). Then, it gets 17.53/5.68 * the element using ListIterator.next and returns it. 17.53/5.68 * 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public E get(int index) { 17.53/5.68 try { 17.53/5.68 return listIterator(index).next(); 17.53/5.68 } catch (NoSuchElementException exc) { 17.53/5.68 throw new IndexOutOfBoundsException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Replaces the element at the specified position in this list with the 17.53/5.68 * specified element (optional operation). 17.53/5.68 * 17.53/5.68 *

This implementation first gets a list iterator pointing to the 17.53/5.68 * indexed element (with listIterator(index)). Then, it gets 17.53/5.68 * the current element using ListIterator.next and replaces it 17.53/5.68 * with ListIterator.set. 17.53/5.68 * 17.53/5.68 *

Note that this implementation will throw an 17.53/5.68 * UnsupportedOperationException if the list iterator does not 17.53/5.68 * implement the set operation. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public E set(int index, E element) { 17.53/5.68 try { 17.53/5.68 ListIterator e = listIterator(index); 17.53/5.68 E oldVal = e.next(); 17.53/5.68 e.set(element); 17.53/5.68 return oldVal; 17.53/5.68 } catch (NoSuchElementException exc) { 17.53/5.68 throw new IndexOutOfBoundsException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Inserts the specified element at the specified position in this list 17.53/5.68 * (optional operation). Shifts the element currently at that position 17.53/5.68 * (if any) and any subsequent elements to the right (adds one to their 17.53/5.68 * indices). 17.53/5.68 * 17.53/5.68 *

This implementation first gets a list iterator pointing to the 17.53/5.68 * indexed element (with listIterator(index)). Then, it 17.53/5.68 * inserts the specified element with ListIterator.add. 17.53/5.68 * 17.53/5.68 *

Note that this implementation will throw an 17.53/5.68 * UnsupportedOperationException if the list iterator does not 17.53/5.68 * implement the add operation. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public void add(int index, E element) { 17.53/5.68 try { 17.53/5.68 listIterator(index).add(element); 17.53/5.68 } catch (NoSuchElementException exc) { 17.53/5.68 throw new IndexOutOfBoundsException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Removes the element at the specified position in this list (optional 17.53/5.68 * operation). Shifts any subsequent elements to the left (subtracts one 17.53/5.68 * from their indices). Returns the element that was removed from the 17.53/5.68 * list. 17.53/5.68 * 17.53/5.68 *

This implementation first gets a list iterator pointing to the 17.53/5.68 * indexed element (with listIterator(index)). Then, it removes 17.53/5.68 * the element with ListIterator.remove. 17.53/5.68 * 17.53/5.68 *

Note that this implementation will throw an 17.53/5.68 * UnsupportedOperationException if the list iterator does not 17.53/5.68 * implement the remove operation. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public E remove(int index) { 17.53/5.68 try { 17.53/5.68 ListIterator e = listIterator(index); 17.53/5.68 E outCast = e.next(); 17.53/5.68 e.remove(); 17.53/5.68 return outCast; 17.53/5.68 } catch (NoSuchElementException exc) { 17.53/5.68 throw new IndexOutOfBoundsException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 // Bulk Operations 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Inserts all of the elements in the specified collection into this 17.53/5.68 * list at the specified position (optional operation). Shifts the 17.53/5.68 * element currently at that position (if any) and any subsequent 17.53/5.68 * elements to the right (increases their indices). The new elements 17.53/5.68 * will appear in this list in the order that they are returned by the 17.53/5.68 * specified collection's iterator. The behavior of this operation is 17.53/5.68 * undefined if the specified collection is modified while the 17.53/5.68 * operation is in progress. (Note that this will occur if the specified 17.53/5.68 * collection is this list, and it's nonempty.) 17.53/5.68 * 17.53/5.68 *

This implementation gets an iterator over the specified collection and 17.53/5.68 * a list iterator over this list pointing to the indexed element (with 17.53/5.68 * listIterator(index)). Then, it iterates over the specified 17.53/5.68 * collection, inserting the elements obtained from the iterator into this 17.53/5.68 * list, one at a time, using ListIterator.add followed by 17.53/5.68 * ListIterator.next (to skip over the added element). 17.53/5.68 * 17.53/5.68 *

Note that this implementation will throw an 17.53/5.68 * UnsupportedOperationException if the list iterator returned by 17.53/5.68 * the listIterator method does not implement the add 17.53/5.68 * operation. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException {@inheritDoc} 17.53/5.68 * @throws ClassCastException {@inheritDoc} 17.53/5.68 * @throws NullPointerException {@inheritDoc} 17.53/5.68 * @throws IllegalArgumentException {@inheritDoc} 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public boolean addAll(int index, Collection c) { 17.53/5.68 try { 17.53/5.68 boolean modified = false; 17.53/5.68 ListIterator e1 = listIterator(index); 17.53/5.68 Iterator e2 = c.iterator(); 17.53/5.68 while (e2.hasNext()) { 17.53/5.68 e1.add(e2.next()); 17.53/5.68 modified = true; 17.53/5.68 } 17.53/5.68 return modified; 17.53/5.68 } catch (NoSuchElementException exc) { 17.53/5.68 throw new IndexOutOfBoundsException(); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 // Iterators 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns an iterator over the elements in this list (in proper 17.53/5.68 * sequence).

17.53/5.68 * 17.53/5.68 * This implementation merely returns a list iterator over the list. 17.53/5.68 * 17.53/5.68 * @return an iterator over the elements in this list (in proper sequence) 17.53/5.68 */ 17.53/5.68 public Iterator iterator() { 17.53/5.68 return listIterator(); 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns a list iterator over the elements in this list (in proper 17.53/5.68 * sequence). 17.53/5.68 * 17.53/5.68 * @param index index of first element to be returned from the list 17.53/5.68 * iterator (by a call to the next method) 17.53/5.68 * @return a list iterator over the elements in this list (in proper 17.53/5.68 * sequence) 17.53/5.68 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.68 */ 17.53/5.68 public abstract ListIterator listIterator(int index); 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 /* 17.53/5.68 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.68 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.68 * 17.53/5.68 * This code is free software; you can redistribute it and/or modify it 17.53/5.68 * under the terms of the GNU General Public License version 2 only, as 17.53/5.68 * published by the Free Software Foundation. Sun designates this 17.53/5.68 * particular file as subject to the "Classpath" exception as provided 17.53/5.68 * by Sun in the LICENSE file that accompanied this code. 17.53/5.68 * 17.53/5.68 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.68 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.68 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.68 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.68 * accompanied this code). 17.53/5.68 * 17.53/5.68 * You should have received a copy of the GNU General Public License version 17.53/5.68 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.68 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.68 * 17.53/5.68 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.68 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.68 * have any questions. 17.53/5.68 */ 17.53/5.68 17.53/5.68 package javaUtilEx; 17.53/5.68 17.53/5.68 /** 17.53/5.68 * The root interface in the collection hierarchy. A collection 17.53/5.68 * represents a group of objects, known as its elements. Some 17.53/5.68 * collections allow duplicate elements and others do not. Some are ordered 17.53/5.68 * and others unordered. The JDK does not provide any direct 17.53/5.68 * implementations of this interface: it provides implementations of more 17.53/5.68 * specific subinterfaces like Set and List. This interface 17.53/5.68 * is typically used to pass collections around and manipulate them where 17.53/5.68 * maximum generality is desired. 17.53/5.68 * 17.53/5.68 *

Bags or multisets (unordered collections that may contain 17.53/5.68 * duplicate elements) should implement this interface directly. 17.53/5.68 * 17.53/5.68 *

All general-purpose Collection implementation classes (which 17.53/5.68 * typically implement Collection indirectly through one of its 17.53/5.68 * subinterfaces) should provide two "standard" constructors: a void (no 17.53/5.68 * arguments) constructor, which creates an empty collection, and a 17.53/5.68 * constructor with a single argument of type Collection, which 17.53/5.68 * creates a new collection with the same elements as its argument. In 17.53/5.68 * effect, the latter constructor allows the user to copy any collection, 17.53/5.68 * producing an equivalent collection of the desired implementation type. 17.53/5.68 * There is no way to enforce this convention (as interfaces cannot contain 17.53/5.68 * constructors) but all of the general-purpose Collection 17.53/5.68 * implementations in the Java platform libraries comply. 17.53/5.68 * 17.53/5.68 *

The "destructive" methods contained in this interface, that is, the 17.53/5.68 * methods that modify the collection on which they operate, are specified to 17.53/5.68 * throw UnsupportedOperationException if this collection does not 17.53/5.68 * support the operation. If this is the case, these methods may, but are not 17.53/5.68 * required to, throw an UnsupportedOperationException if the 17.53/5.68 * invocation would have no effect on the collection. For example, invoking 17.53/5.68 * the {@link #addAll(Collection)} method on an unmodifiable collection may, 17.53/5.68 * but is not required to, throw the exception if the collection to be added 17.53/5.68 * is empty. 17.53/5.68 * 17.53/5.68 *

Some collection implementations have restrictions on the elements that 17.53/5.68 * they may contain. For example, some implementations prohibit null elements, 17.53/5.68 * and some have restrictions on the types of their elements. Attempting to 17.53/5.68 * add an ineligible element throws an unchecked exception, typically 17.53/5.68 * NullPointerException or ClassCastException. Attempting 17.53/5.68 * to query the presence of an ineligible element may throw an exception, 17.53/5.68 * or it may simply return false; some implementations will exhibit the former 17.53/5.68 * behavior and some will exhibit the latter. More generally, attempting an 17.53/5.68 * operation on an ineligible element whose completion would not result in 17.53/5.68 * the insertion of an ineligible element into the collection may throw an 17.53/5.68 * exception or it may succeed, at the option of the implementation. 17.53/5.68 * Such exceptions are marked as "optional" in the specification for this 17.53/5.68 * interface. 17.53/5.68 * 17.53/5.68 *

It is up to each collection to determine its own synchronization 17.53/5.68 * policy. In the absence of a stronger guarantee by the 17.53/5.68 * implementation, undefined behavior may result from the invocation 17.53/5.68 * of any method on a collection that is being mutated by another 17.53/5.68 * thread; this includes direct invocations, passing the collection to 17.53/5.68 * a method that might perform invocations, and using an existing 17.53/5.68 * iterator to examine the collection. 17.53/5.68 * 17.53/5.68 *

Many methods in Collections Framework interfaces are defined in 17.53/5.68 * terms of the {@link Object#equals(Object) equals} method. For example, 17.53/5.68 * the specification for the {@link #contains(Object) contains(Object o)} 17.53/5.68 * method says: "returns true if and only if this collection 17.53/5.68 * contains at least one element e such that 17.53/5.68 * (o==null ? e==null : o.equals(e))." This specification should 17.53/5.68 * not be construed to imply that invoking Collection.contains 17.53/5.68 * with a non-null argument o will cause o.equals(e) to be 17.53/5.68 * invoked for any element e. Implementations are free to implement 17.53/5.68 * optimizations whereby the equals invocation is avoided, for 17.53/5.68 * example, by first comparing the hash codes of the two elements. (The 17.53/5.68 * {@link Object#hashCode()} specification guarantees that two objects with 17.53/5.68 * unequal hash codes cannot be equal.) More generally, implementations of 17.53/5.68 * the various Collections Framework interfaces are free to take advantage of 17.53/5.68 * the specified behavior of underlying {@link Object} methods wherever the 17.53/5.68 * implementor deems it appropriate. 17.53/5.68 * 17.53/5.68 *

This interface is a member of the 17.53/5.68 * 17.53/5.68 * Java Collections Framework. 17.53/5.68 * 17.53/5.68 * @author Josh Bloch 17.53/5.68 * @author Neal Gafter 17.53/5.68 * @see Set 17.53/5.68 * @see List 17.53/5.68 * @see Map 17.53/5.68 * @see SortedSet 17.53/5.68 * @see SortedMap 17.53/5.68 * @see HashSet 17.53/5.68 * @see TreeSet 17.53/5.68 * @see ArrayList 17.53/5.68 * @see LinkedList 17.53/5.68 * @see Vector 17.53/5.68 * @see Collections 17.53/5.68 * @see Arrays 17.53/5.68 * @see AbstractCollection 17.53/5.68 * @since 1.2 17.53/5.68 */ 17.53/5.68 17.53/5.68 public interface Collection { 17.53/5.68 // Query Operations 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns the number of elements in this collection. If this collection 17.53/5.68 * contains more than Integer.MAX_VALUE elements, returns 17.53/5.68 * Integer.MAX_VALUE. 17.53/5.68 * 17.53/5.68 * @return the number of elements in this collection 17.53/5.68 */ 17.53/5.68 int size(); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns true if this collection contains no elements. 17.53/5.68 * 17.53/5.68 * @return true if this collection contains no elements 17.53/5.68 */ 17.53/5.68 boolean isEmpty(); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns true if this collection contains the specified element. 17.53/5.68 * More formally, returns true if and only if this collection 17.53/5.68 * contains at least one element e such that 17.53/5.68 * (o==null ? e==null : o.equals(e)). 17.53/5.68 * 17.53/5.68 * @param o element whose presence in this collection is to be tested 17.53/5.68 * @return true if this collection contains the specified 17.53/5.68 * element 17.53/5.68 * @throws ClassCastException if the type of the specified element 17.53/5.68 * is incompatible with this collection (optional) 17.53/5.68 * @throws NullPointerException if the specified element is null and this 17.53/5.68 * collection does not permit null elements (optional) 17.53/5.68 */ 17.53/5.68 boolean contains(Object o); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns an iterator over the elements in this collection. There are no 17.53/5.68 * guarantees concerning the order in which the elements are returned 17.53/5.68 * (unless this collection is an instance of some class that provides a 17.53/5.68 * guarantee). 17.53/5.68 * 17.53/5.68 * @return an Iterator over the elements in this collection 17.53/5.68 */ 17.53/5.68 Iterator iterator(); 17.53/5.68 17.53/5.68 // Modification Operations 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Ensures that this collection contains the specified element (optional 17.53/5.68 * operation). Returns true if this collection changed as a 17.53/5.68 * result of the call. (Returns false if this collection does 17.53/5.68 * not permit duplicates and already contains the specified element.)

17.53/5.68 * 17.53/5.68 * Collections that support this operation may place limitations on what 17.53/5.68 * elements may be added to this collection. In particular, some 17.53/5.68 * collections will refuse to add null elements, and others will 17.53/5.68 * impose restrictions on the type of elements that may be added. 17.53/5.68 * Collection classes should clearly specify in their documentation any 17.53/5.68 * restrictions on what elements may be added.

17.53/5.68 * 17.53/5.68 * If a collection refuses to add a particular element for any reason 17.53/5.68 * other than that it already contains the element, it must throw 17.53/5.68 * an exception (rather than returning false). This preserves 17.53/5.68 * the invariant that a collection always contains the specified element 17.53/5.68 * after this call returns. 17.53/5.68 * 17.53/5.68 * @param e element whose presence in this collection is to be ensured 17.53/5.68 * @return true if this collection changed as a result of the 17.53/5.68 * call 17.53/5.68 * @throws UnsupportedOperationException if the add operation 17.53/5.68 * is not supported by this collection 17.53/5.68 * @throws ClassCastException if the class of the specified element 17.53/5.68 * prevents it from being added to this collection 17.53/5.68 * @throws NullPointerException if the specified element is null and this 17.53/5.68 * collection does not permit null elements 17.53/5.68 * @throws IllegalArgumentException if some property of the element 17.53/5.68 * prevents it from being added to this collection 17.53/5.68 * @throws IllegalStateException if the element cannot be added at this 17.53/5.68 * time due to insertion restrictions 17.53/5.68 */ 17.53/5.68 boolean add(E e); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Removes a single instance of the specified element from this 17.53/5.68 * collection, if it is present (optional operation). More formally, 17.53/5.68 * removes an element e such that 17.53/5.68 * (o==null ? e==null : o.equals(e)), if 17.53/5.68 * this collection contains one or more such elements. Returns 17.53/5.68 * true if this collection contained the specified element (or 17.53/5.68 * equivalently, if this collection changed as a result of the call). 17.53/5.68 * 17.53/5.68 * @param o element to be removed from this collection, if present 17.53/5.68 * @return true if an element was removed as a result of this call 17.53/5.68 * @throws ClassCastException if the type of the specified element 17.53/5.68 * is incompatible with this collection (optional) 17.53/5.68 * @throws NullPointerException if the specified element is null and this 17.53/5.68 * collection does not permit null elements (optional) 17.53/5.68 * @throws UnsupportedOperationException if the remove operation 17.53/5.68 * is not supported by this collection 17.53/5.68 */ 17.53/5.68 boolean remove(Object o); 17.53/5.68 17.53/5.68 17.53/5.68 // Bulk Operations 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns true if this collection contains all of the elements 17.53/5.68 * in the specified collection. 17.53/5.68 * 17.53/5.68 * @param c collection to be checked for containment in this collection 17.53/5.68 * @return true if this collection contains all of the elements 17.53/5.68 * in the specified collection 17.53/5.68 * @throws ClassCastException if the types of one or more elements 17.53/5.68 * in the specified collection are incompatible with this 17.53/5.68 * collection (optional) 17.53/5.68 * @throws NullPointerException if the specified collection contains one 17.53/5.68 * or more null elements and this collection does not permit null 17.53/5.68 * elements (optional), or if the specified collection is null 17.53/5.68 * @see #contains(Object) 17.53/5.68 */ 17.53/5.68 boolean containsAll(Collection c); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Adds all of the elements in the specified collection to this collection 17.53/5.68 * (optional operation). The behavior of this operation is undefined if 17.53/5.68 * the specified collection is modified while the operation is in progress. 17.53/5.68 * (This implies that the behavior of this call is undefined if the 17.53/5.68 * specified collection is this collection, and this collection is 17.53/5.68 * nonempty.) 17.53/5.68 * 17.53/5.68 * @param c collection containing elements to be added to this collection 17.53/5.68 * @return true if this collection changed as a result of the call 17.53/5.68 * @throws UnsupportedOperationException if the addAll operation 17.53/5.68 * is not supported by this collection 17.53/5.68 * @throws ClassCastException if the class of an element of the specified 17.53/5.68 * collection prevents it from being added to this collection 17.53/5.68 * @throws NullPointerException if the specified collection contains a 17.53/5.68 * null element and this collection does not permit null elements, 17.53/5.68 * or if the specified collection is null 17.53/5.68 * @throws IllegalArgumentException if some property of an element of the 17.53/5.68 * specified collection prevents it from being added to this 17.53/5.68 * collection 17.53/5.68 * @throws IllegalStateException if not all the elements can be added at 17.53/5.68 * this time due to insertion restrictions 17.53/5.68 * @see #add(Object) 17.53/5.68 */ 17.53/5.68 boolean addAll(Collection c); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Removes all of this collection's elements that are also contained in the 17.53/5.68 * specified collection (optional operation). After this call returns, 17.53/5.68 * this collection will contain no elements in common with the specified 17.53/5.68 * collection. 17.53/5.68 * 17.53/5.68 * @param c collection containing elements to be removed from this collection 17.53/5.68 * @return true if this collection changed as a result of the 17.53/5.68 * call 17.53/5.68 * @throws UnsupportedOperationException if the removeAll method 17.53/5.68 * is not supported by this collection 17.53/5.68 * @throws ClassCastException if the types of one or more elements 17.53/5.68 * in this collection are incompatible with the specified 17.53/5.68 * collection (optional) 17.53/5.68 * @throws NullPointerException if this collection contains one or more 17.53/5.68 * null elements and the specified collection does not support 17.53/5.68 * null elements (optional), or if the specified collection is null 17.53/5.68 * @see #remove(Object) 17.53/5.68 * @see #contains(Object) 17.53/5.68 */ 17.53/5.68 boolean removeAll(Collection c); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Retains only the elements in this collection that are contained in the 17.53/5.68 * specified collection (optional operation). In other words, removes from 17.53/5.68 * this collection all of its elements that are not contained in the 17.53/5.68 * specified collection. 17.53/5.68 * 17.53/5.68 * @param c collection containing elements to be retained in this collection 17.53/5.68 * @return true if this collection changed as a result of the call 17.53/5.68 * @throws UnsupportedOperationException if the retainAll operation 17.53/5.68 * is not supported by this collection 17.53/5.68 * @throws ClassCastException if the types of one or more elements 17.53/5.68 * in this collection are incompatible with the specified 17.53/5.68 * collection (optional) 17.53/5.68 * @throws NullPointerException if this collection contains one or more 17.53/5.68 * null elements and the specified collection does not permit null 17.53/5.68 * elements (optional), or if the specified collection is null 17.53/5.68 * @see #remove(Object) 17.53/5.68 * @see #contains(Object) 17.53/5.68 */ 17.53/5.68 boolean retainAll(Collection c); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Removes all of the elements from this collection (optional operation). 17.53/5.68 * The collection will be empty after this method returns. 17.53/5.68 * 17.53/5.68 * @throws UnsupportedOperationException if the clear operation 17.53/5.68 * is not supported by this collection 17.53/5.68 */ 17.53/5.68 void clear(); 17.53/5.68 17.53/5.68 17.53/5.68 // Comparison and hashing 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Compares the specified object with this collection for equality.

17.53/5.68 * 17.53/5.68 * While the Collection interface adds no stipulations to the 17.53/5.68 * general contract for the Object.equals, programmers who 17.53/5.68 * implement the Collection interface "directly" (in other words, 17.53/5.68 * create a class that is a Collection but is not a Set 17.53/5.68 * or a List) must exercise care if they choose to override the 17.53/5.68 * Object.equals. It is not necessary to do so, and the simplest 17.53/5.68 * course of action is to rely on Object's implementation, but 17.53/5.68 * the implementor may wish to implement a "value comparison" in place of 17.53/5.68 * the default "reference comparison." (The List and 17.53/5.68 * Set interfaces mandate such value comparisons.)

17.53/5.68 * 17.53/5.68 * The general contract for the Object.equals method states that 17.53/5.68 * equals must be symmetric (in other words, a.equals(b) if and 17.53/5.68 * only if b.equals(a)). The contracts for List.equals 17.53/5.68 * and Set.equals state that lists are only equal to other lists, 17.53/5.68 * and sets to other sets. Thus, a custom equals method for a 17.53/5.68 * collection class that implements neither the List nor 17.53/5.68 * Set interface must return false when this collection 17.53/5.68 * is compared to any list or set. (By the same logic, it is not possible 17.53/5.68 * to write a class that correctly implements both the Set and 17.53/5.68 * List interfaces.) 17.53/5.68 * 17.53/5.68 * @param o object to be compared for equality with this collection 17.53/5.68 * @return true if the specified object is equal to this 17.53/5.68 * collection 17.53/5.68 * 17.53/5.68 * @see Object#equals(Object) 17.53/5.68 * @see Set#equals(Object) 17.53/5.68 * @see List#equals(Object) 17.53/5.68 */ 17.53/5.68 boolean equals(Object o); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Returns the hash code value for this collection. While the 17.53/5.68 * Collection interface adds no stipulations to the general 17.53/5.68 * contract for the Object.hashCode method, programmers should 17.53/5.68 * take note that any class that overrides the Object.equals 17.53/5.68 * method must also override the Object.hashCode method in order 17.53/5.68 * to satisfy the general contract for the Object.hashCodemethod. 17.53/5.68 * In particular, c1.equals(c2) implies that 17.53/5.68 * c1.hashCode()==c2.hashCode(). 17.53/5.68 * 17.53/5.68 * @return the hash code value for this collection 17.53/5.68 * 17.53/5.68 * @see Object#hashCode() 17.53/5.68 * @see Object#equals(Object) 17.53/5.68 */ 17.53/5.68 int hashCode(); 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 /* 17.53/5.68 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.68 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.68 * 17.53/5.68 * This code is free software; you can redistribute it and/or modify it 17.53/5.68 * under the terms of the GNU General Public License version 2 only, as 17.53/5.68 * published by the Free Software Foundation. Sun designates this 17.53/5.68 * particular file as subject to the "Classpath" exception as provided 17.53/5.68 * by Sun in the LICENSE file that accompanied this code. 17.53/5.68 * 17.53/5.68 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.68 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.68 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.68 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.68 * accompanied this code). 17.53/5.68 * 17.53/5.68 * You should have received a copy of the GNU General Public License version 17.53/5.68 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.68 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.68 * 17.53/5.68 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.68 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.68 * have any questions. 17.53/5.68 */ 17.53/5.68 17.53/5.68 package javaUtilEx; 17.53/5.68 17.53/5.68 /** 17.53/5.68 * This exception may be thrown by methods that have detected concurrent 17.53/5.68 * modification of an object when such modification is not permissible. 17.53/5.68 *

17.53/5.68 * For example, it is not generally permissible for one thread to modify a Collection 17.53/5.68 * while another thread is iterating over it. In general, the results of the 17.53/5.68 * iteration are undefined under these circumstances. Some Iterator 17.53/5.68 * implementations (including those of all the general purpose collection implementations 17.53/5.68 * provided by the JRE) may choose to throw this exception if this behavior is 17.53/5.68 * detected. Iterators that do this are known as fail-fast iterators, 17.53/5.68 * as they fail quickly and cleanly, rather that risking arbitrary, 17.53/5.68 * non-deterministic behavior at an undetermined time in the future. 17.53/5.68 *

17.53/5.68 * Note that this exception does not always indicate that an object has 17.53/5.68 * been concurrently modified by a different thread. If a single 17.53/5.68 * thread issues a sequence of method invocations that violates the 17.53/5.68 * contract of an object, the object may throw this exception. For 17.53/5.68 * example, if a thread modifies a collection directly while it is 17.53/5.68 * iterating over the collection with a fail-fast iterator, the iterator 17.53/5.68 * will throw this exception. 17.53/5.68 * 17.53/5.68 *

Note that fail-fast behavior cannot be guaranteed as it is, generally 17.53/5.68 * speaking, impossible to make any hard guarantees in the presence of 17.53/5.68 * unsynchronized concurrent modification. Fail-fast operations 17.53/5.68 * throw ConcurrentModificationException on a best-effort basis. 17.53/5.68 * Therefore, it would be wrong to write a program that depended on this 17.53/5.68 * exception for its correctness: ConcurrentModificationException 17.53/5.68 * should be used only to detect bugs. 17.53/5.68 * 17.53/5.68 * @author Josh Bloch 17.53/5.68 * @see Collection 17.53/5.68 * @see Iterator 17.53/5.68 * @see ListIterator 17.53/5.68 * @see Vector 17.53/5.68 * @see LinkedList 17.53/5.68 * @see HashSet 17.53/5.68 * @see Hashtable 17.53/5.68 * @see TreeMap 17.53/5.68 * @see AbstractList 17.53/5.68 * @since 1.2 17.53/5.68 */ 17.53/5.68 public class ConcurrentModificationException extends RuntimeException { 17.53/5.68 /** 17.53/5.68 * Constructs a ConcurrentModificationException with no 17.53/5.68 * detail message. 17.53/5.68 */ 17.53/5.68 public ConcurrentModificationException() { 17.53/5.68 } 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Constructs a ConcurrentModificationException with the 17.53/5.68 * specified detail message. 17.53/5.68 * 17.53/5.68 * @param message the detail message pertaining to this exception. 17.53/5.68 */ 17.53/5.68 public ConcurrentModificationException(String message) { 17.53/5.68 super(message); 17.53/5.68 } 17.53/5.68 } 17.53/5.68 17.53/5.68 17.53/5.68 /* 17.53/5.68 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.68 * 17.53/5.68 * This code is free software; you can redistribute it and/or modify it 17.53/5.68 * under the terms of the GNU General Public License version 2 only, as 17.53/5.68 * published by the Free Software Foundation. Sun designates this 17.53/5.68 * particular file as subject to the "Classpath" exception as provided 17.53/5.68 * by Sun in the LICENSE file that accompanied this code. 17.53/5.68 * 17.53/5.68 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.68 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.68 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.68 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.68 * accompanied this code). 17.53/5.68 * 17.53/5.68 * You should have received a copy of the GNU General Public License version 17.53/5.68 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.68 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.68 * 17.53/5.68 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.68 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.68 * have any questions. 17.53/5.68 */ 17.53/5.68 17.53/5.68 /* 17.53/5.68 * This file is available under and governed by the GNU General Public 17.53/5.68 * License version 2 only, as published by the Free Software Foundation. 17.53/5.68 * However, the following notice accompanied the original version of this 17.53/5.68 * file: 17.53/5.68 * 17.53/5.68 * Written by Doug Lea and Josh Bloch with assistance from members of 17.53/5.68 * JCP JSR-166 Expert Group and released to the public domain, as explained 17.53/5.68 * at http://creativecommons.org/licenses/publicdomain 17.53/5.68 */ 17.53/5.68 17.53/5.68 package javaUtilEx; 17.53/5.68 17.53/5.68 /** 17.53/5.68 * A linear collection that supports element insertion and removal at 17.53/5.68 * both ends. The name deque is short for "double ended queue" 17.53/5.68 * and is usually pronounced "deck". Most Deque 17.53/5.68 * implementations place no fixed limits on the number of elements 17.53/5.68 * they may contain, but this interface supports capacity-restricted 17.53/5.68 * deques as well as those with no fixed size limit. 17.53/5.68 * 17.53/5.68 *

This interface defines methods to access the elements at both 17.53/5.68 * ends of the deque. Methods are provided to insert, remove, and 17.53/5.68 * examine the element. Each of these methods exists in two forms: 17.53/5.68 * one throws an exception if the operation fails, the other returns a 17.53/5.68 * special value (either null or false, depending on 17.53/5.68 * the operation). The latter form of the insert operation is 17.53/5.68 * designed specifically for use with capacity-restricted 17.53/5.68 * Deque implementations; in most implementations, insert 17.53/5.68 * operations cannot fail. 17.53/5.68 * 17.53/5.68 *

The twelve methods described above are summarized in the 17.53/5.68 * following table: 17.53/5.68 * 17.53/5.68 *

17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 *
First Element (Head) Last Element (Tail)
Throws exceptionSpecial valueThrows exceptionSpecial value
Insert{@link #addFirst addFirst(e)}{@link #offerFirst offerFirst(e)}{@link #addLast addLast(e)}{@link #offerLast offerLast(e)}
Remove{@link #removeFirst removeFirst()}{@link #pollFirst pollFirst()}{@link #removeLast removeLast()}{@link #pollLast pollLast()}
Examine{@link #getFirst getFirst()}{@link #peekFirst peekFirst()}{@link #getLast getLast()}{@link #peekLast peekLast()}
17.53/5.68 * 17.53/5.68 *

This interface extends the {@link Queue} interface. When a deque is 17.53/5.68 * used as a queue, FIFO (First-In-First-Out) behavior results. Elements are 17.53/5.68 * added at the end of the deque and removed from the beginning. The methods 17.53/5.68 * inherited from the Queue interface are precisely equivalent to 17.53/5.68 * Deque methods as indicated in the following table: 17.53/5.68 * 17.53/5.68 *

17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 *
Queue Method Equivalent Deque Method
{@link java.util.Queue#add add(e)}{@link #addLast addLast(e)}
{@link java.util.Queue#offer offer(e)}{@link #offerLast offerLast(e)}
{@link java.util.Queue#remove remove()}{@link #removeFirst removeFirst()}
{@link java.util.Queue#poll poll()}{@link #pollFirst pollFirst()}
{@link java.util.Queue#element element()}{@link #getFirst getFirst()}
{@link java.util.Queue#peek peek()}{@link #peek peekFirst()}
17.53/5.68 * 17.53/5.68 *

Deques can also be used as LIFO (Last-In-First-Out) stacks. This 17.53/5.68 * interface should be used in preference to the legacy {@link Stack} class. 17.53/5.68 * When a deque is used as a stack, elements are pushed and popped from the 17.53/5.68 * beginning of the deque. Stack methods are precisely equivalent to 17.53/5.68 * Deque methods as indicated in the table below: 17.53/5.68 * 17.53/5.68 *

17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 * 17.53/5.68 *
Stack Method Equivalent Deque Method
{@link #push push(e)}{@link #addFirst addFirst(e)}
{@link #pop pop()}{@link #removeFirst removeFirst()}
{@link #peek peek()}{@link #peekFirst peekFirst()}
17.53/5.68 * 17.53/5.68 *

Note that the {@link #peek peek} method works equally well when 17.53/5.68 * a deque is used as a queue or a stack; in either case, elements are 17.53/5.68 * drawn from the beginning of the deque. 17.53/5.68 * 17.53/5.68 *

This interface provides two methods to remove interior 17.53/5.68 * elements, {@link #removeFirstOccurrence removeFirstOccurrence} and 17.53/5.68 * {@link #removeLastOccurrence removeLastOccurrence}. 17.53/5.68 * 17.53/5.68 *

Unlike the {@link List} interface, this interface does not 17.53/5.68 * provide support for indexed access to elements. 17.53/5.68 * 17.53/5.68 *

While Deque implementations are not strictly required 17.53/5.68 * to prohibit the insertion of null elements, they are strongly 17.53/5.68 * encouraged to do so. Users of any Deque implementations 17.53/5.68 * that do allow null elements are strongly encouraged not to 17.53/5.68 * take advantage of the ability to insert nulls. This is so because 17.53/5.68 * null is used as a special return value by various methods 17.53/5.68 * to indicated that the deque is empty. 17.53/5.68 * 17.53/5.68 *

Deque implementations generally do not define 17.53/5.68 * element-based versions of the equals and hashCode 17.53/5.68 * methods, but instead inherit the identity-based versions from class 17.53/5.68 * Object. 17.53/5.68 * 17.53/5.68 *

This interface is a member of the Java Collections 17.53/5.68 * Framework. 17.53/5.68 * 17.53/5.68 * @author Doug Lea 17.53/5.68 * @author Josh Bloch 17.53/5.68 * @since 1.6 17.53/5.68 * @param the type of elements held in this collection 17.53/5.68 */ 17.53/5.68 17.53/5.68 public interface Deque extends Queue { 17.53/5.68 /** 17.53/5.68 * Inserts the specified element at the front of this deque if it is 17.53/5.68 * possible to do so immediately without violating capacity restrictions. 17.53/5.68 * When using a capacity-restricted deque, it is generally preferable to 17.53/5.68 * use method {@link #offerFirst}. 17.53/5.68 * 17.53/5.68 * @param e the element to add 17.53/5.68 * @throws IllegalStateException if the element cannot be added at this 17.53/5.68 * time due to capacity restrictions 17.53/5.68 * @throws ClassCastException if the class of the specified element 17.53/5.68 * prevents it from being added to this deque 17.53/5.68 * @throws NullPointerException if the specified element is null and this 17.53/5.68 * deque does not permit null elements 17.53/5.68 * @throws IllegalArgumentException if some property of the specified 17.53/5.68 * element prevents it from being added to this deque 17.53/5.68 */ 17.53/5.68 void addFirst(E e); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Inserts the specified element at the end of this deque if it is 17.53/5.68 * possible to do so immediately without violating capacity restrictions. 17.53/5.68 * When using a capacity-restricted deque, it is generally preferable to 17.53/5.68 * use method {@link #offerLast}. 17.53/5.68 * 17.53/5.68 *

This method is equivalent to {@link #add}. 17.53/5.68 * 17.53/5.68 * @param e the element to add 17.53/5.68 * @throws IllegalStateException if the element cannot be added at this 17.53/5.68 * time due to capacity restrictions 17.53/5.68 * @throws ClassCastException if the class of the specified element 17.53/5.68 * prevents it from being added to this deque 17.53/5.68 * @throws NullPointerException if the specified element is null and this 17.53/5.68 * deque does not permit null elements 17.53/5.68 * @throws IllegalArgumentException if some property of the specified 17.53/5.68 * element prevents it from being added to this deque 17.53/5.68 */ 17.53/5.68 void addLast(E e); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Inserts the specified element at the front of this deque unless it would 17.53/5.68 * violate capacity restrictions. When using a capacity-restricted deque, 17.53/5.68 * this method is generally preferable to the {@link #addFirst} method, 17.53/5.68 * which can fail to insert an element only by throwing an exception. 17.53/5.68 * 17.53/5.68 * @param e the element to add 17.53/5.68 * @return true if the element was added to this deque, else 17.53/5.68 * false 17.53/5.68 * @throws ClassCastException if the class of the specified element 17.53/5.68 * prevents it from being added to this deque 17.53/5.68 * @throws NullPointerException if the specified element is null and this 17.53/5.68 * deque does not permit null elements 17.53/5.68 * @throws IllegalArgumentException if some property of the specified 17.53/5.68 * element prevents it from being added to this deque 17.53/5.68 */ 17.53/5.68 boolean offerFirst(E e); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Inserts the specified element at the end of this deque unless it would 17.53/5.68 * violate capacity restrictions. When using a capacity-restricted deque, 17.53/5.68 * this method is generally preferable to the {@link #addLast} method, 17.53/5.68 * which can fail to insert an element only by throwing an exception. 17.53/5.68 * 17.53/5.68 * @param e the element to add 17.53/5.68 * @return true if the element was added to this deque, else 17.53/5.68 * false 17.53/5.68 * @throws ClassCastException if the class of the specified element 17.53/5.68 * prevents it from being added to this deque 17.53/5.68 * @throws NullPointerException if the specified element is null and this 17.53/5.68 * deque does not permit null elements 17.53/5.68 * @throws IllegalArgumentException if some property of the specified 17.53/5.68 * element prevents it from being added to this deque 17.53/5.68 */ 17.53/5.68 boolean offerLast(E e); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Retrieves and removes the first element of this deque. This method 17.53/5.68 * differs from {@link #pollFirst pollFirst} only in that it throws an 17.53/5.68 * exception if this deque is empty. 17.53/5.68 * 17.53/5.68 * @return the head of this deque 17.53/5.68 * @throws NoSuchElementException if this deque is empty 17.53/5.68 */ 17.53/5.68 E removeFirst(); 17.53/5.68 17.53/5.68 /** 17.53/5.68 * Retrieves and removes the last element of this deque. This method 17.53/5.69 * differs from {@link #pollLast pollLast} only in that it throws an 17.53/5.69 * exception if this deque is empty. 17.53/5.69 * 17.53/5.69 * @return the tail of this deque 17.53/5.69 * @throws NoSuchElementException if this deque is empty 17.53/5.69 */ 17.53/5.69 E removeLast(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves and removes the first element of this deque, 17.53/5.69 * or returns null if this deque is empty. 17.53/5.69 * 17.53/5.69 * @return the head of this deque, or null if this deque is empty 17.53/5.69 */ 17.53/5.69 E pollFirst(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves and removes the last element of this deque, 17.53/5.69 * or returns null if this deque is empty. 17.53/5.69 * 17.53/5.69 * @return the tail of this deque, or null if this deque is empty 17.53/5.69 */ 17.53/5.69 E pollLast(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves, but does not remove, the first element of this deque. 17.53/5.69 * 17.53/5.69 * This method differs from {@link #peekFirst peekFirst} only in that it 17.53/5.69 * throws an exception if this deque is empty. 17.53/5.69 * 17.53/5.69 * @return the head of this deque 17.53/5.69 * @throws NoSuchElementException if this deque is empty 17.53/5.69 */ 17.53/5.69 E getFirst(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves, but does not remove, the last element of this deque. 17.53/5.69 * This method differs from {@link #peekLast peekLast} only in that it 17.53/5.69 * throws an exception if this deque is empty. 17.53/5.69 * 17.53/5.69 * @return the tail of this deque 17.53/5.69 * @throws NoSuchElementException if this deque is empty 17.53/5.69 */ 17.53/5.69 E getLast(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves, but does not remove, the first element of this deque, 17.53/5.69 * or returns null if this deque is empty. 17.53/5.69 * 17.53/5.69 * @return the head of this deque, or null if this deque is empty 17.53/5.69 */ 17.53/5.69 E peekFirst(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves, but does not remove, the last element of this deque, 17.53/5.69 * or returns null if this deque is empty. 17.53/5.69 * 17.53/5.69 * @return the tail of this deque, or null if this deque is empty 17.53/5.69 */ 17.53/5.69 E peekLast(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes the first occurrence of the specified element from this deque. 17.53/5.69 * If the deque does not contain the element, it is unchanged. 17.53/5.69 * More formally, removes the first element e such that 17.53/5.69 * (o==null ? e==null : o.equals(e)) 17.53/5.69 * (if such an element exists). 17.53/5.69 * Returns true if this deque contained the specified element 17.53/5.69 * (or equivalently, if this deque changed as a result of the call). 17.53/5.69 * 17.53/5.69 * @param o element to be removed from this deque, if present 17.53/5.69 * @return true if an element was removed as a result of this call 17.53/5.69 * @throws ClassCastException if the class of the specified element 17.53/5.69 * is incompatible with this deque (optional) 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * deque does not permit null elements (optional) 17.53/5.69 */ 17.53/5.69 boolean removeFirstOccurrence(Object o); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes the last occurrence of the specified element from this deque. 17.53/5.69 * If the deque does not contain the element, it is unchanged. 17.53/5.69 * More formally, removes the last element e such that 17.53/5.69 * (o==null ? e==null : o.equals(e)) 17.53/5.69 * (if such an element exists). 17.53/5.69 * Returns true if this deque contained the specified element 17.53/5.69 * (or equivalently, if this deque changed as a result of the call). 17.53/5.69 * 17.53/5.69 * @param o element to be removed from this deque, if present 17.53/5.69 * @return true if an element was removed as a result of this call 17.53/5.69 * @throws ClassCastException if the class of the specified element 17.53/5.69 * is incompatible with this deque (optional) 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * deque does not permit null elements (optional) 17.53/5.69 */ 17.53/5.69 boolean removeLastOccurrence(Object o); 17.53/5.69 17.53/5.69 // *** Queue methods *** 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Inserts the specified element into the queue represented by this deque 17.53/5.69 * (in other words, at the tail of this deque) if it is possible to do so 17.53/5.69 * immediately without violating capacity restrictions, returning 17.53/5.69 * true upon success and throwing an 17.53/5.69 * IllegalStateException if no space is currently available. 17.53/5.69 * When using a capacity-restricted deque, it is generally preferable to 17.53/5.69 * use {@link #offer(Object) offer}. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #addLast}. 17.53/5.69 * 17.53/5.69 * @param e the element to add 17.53/5.69 * @return true (as specified by {@link Collection#add}) 17.53/5.69 * @throws IllegalStateException if the element cannot be added at this 17.53/5.69 * time due to capacity restrictions 17.53/5.69 * @throws ClassCastException if the class of the specified element 17.53/5.69 * prevents it from being added to this deque 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * deque does not permit null elements 17.53/5.69 * @throws IllegalArgumentException if some property of the specified 17.53/5.69 * element prevents it from being added to this deque 17.53/5.69 */ 17.53/5.69 boolean add(E e); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Inserts the specified element into the queue represented by this deque 17.53/5.69 * (in other words, at the tail of this deque) if it is possible to do so 17.53/5.69 * immediately without violating capacity restrictions, returning 17.53/5.69 * true upon success and false if no space is currently 17.53/5.69 * available. When using a capacity-restricted deque, this method is 17.53/5.69 * generally preferable to the {@link #add} method, which can fail to 17.53/5.69 * insert an element only by throwing an exception. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #offerLast}. 17.53/5.69 * 17.53/5.69 * @param e the element to add 17.53/5.69 * @return true if the element was added to this deque, else 17.53/5.69 * false 17.53/5.69 * @throws ClassCastException if the class of the specified element 17.53/5.69 * prevents it from being added to this deque 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * deque does not permit null elements 17.53/5.69 * @throws IllegalArgumentException if some property of the specified 17.53/5.69 * element prevents it from being added to this deque 17.53/5.69 */ 17.53/5.69 boolean offer(E e); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves and removes the head of the queue represented by this deque 17.53/5.69 * (in other words, the first element of this deque). 17.53/5.69 * This method differs from {@link #poll poll} only in that it throws an 17.53/5.69 * exception if this deque is empty. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #removeFirst()}. 17.53/5.69 * 17.53/5.69 * @return the head of the queue represented by this deque 17.53/5.69 * @throws NoSuchElementException if this deque is empty 17.53/5.69 */ 17.53/5.69 E remove(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves and removes the head of the queue represented by this deque 17.53/5.69 * (in other words, the first element of this deque), or returns 17.53/5.69 * null if this deque is empty. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #pollFirst()}. 17.53/5.69 * 17.53/5.69 * @return the first element of this deque, or null if 17.53/5.69 * this deque is empty 17.53/5.69 */ 17.53/5.69 E poll(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves, but does not remove, the head of the queue represented by 17.53/5.69 * this deque (in other words, the first element of this deque). 17.53/5.69 * This method differs from {@link #peek peek} only in that it throws an 17.53/5.69 * exception if this deque is empty. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #getFirst()}. 17.53/5.69 * 17.53/5.69 * @return the head of the queue represented by this deque 17.53/5.69 * @throws NoSuchElementException if this deque is empty 17.53/5.69 */ 17.53/5.69 E element(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves, but does not remove, the head of the queue represented by 17.53/5.69 * this deque (in other words, the first element of this deque), or 17.53/5.69 * returns null if this deque is empty. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #peekFirst()}. 17.53/5.69 * 17.53/5.69 * @return the head of the queue represented by this deque, or 17.53/5.69 * null if this deque is empty 17.53/5.69 */ 17.53/5.69 E peek(); 17.53/5.69 17.53/5.69 17.53/5.69 // *** Stack methods *** 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Pushes an element onto the stack represented by this deque (in other 17.53/5.69 * words, at the head of this deque) if it is possible to do so 17.53/5.69 * immediately without violating capacity restrictions, returning 17.53/5.69 * true upon success and throwing an 17.53/5.69 * IllegalStateException if no space is currently available. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #addFirst}. 17.53/5.69 * 17.53/5.69 * @param e the element to push 17.53/5.69 * @throws IllegalStateException if the element cannot be added at this 17.53/5.69 * time due to capacity restrictions 17.53/5.69 * @throws ClassCastException if the class of the specified element 17.53/5.69 * prevents it from being added to this deque 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * deque does not permit null elements 17.53/5.69 * @throws IllegalArgumentException if some property of the specified 17.53/5.69 * element prevents it from being added to this deque 17.53/5.69 */ 17.53/5.69 void push(E e); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Pops an element from the stack represented by this deque. In other 17.53/5.69 * words, removes and returns the first element of this deque. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #removeFirst()}. 17.53/5.69 * 17.53/5.69 * @return the element at the front of this deque (which is the top 17.53/5.69 * of the stack represented by this deque) 17.53/5.69 * @throws NoSuchElementException if this deque is empty 17.53/5.69 */ 17.53/5.69 E pop(); 17.53/5.69 17.53/5.69 17.53/5.69 // *** Collection methods *** 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes the first occurrence of the specified element from this deque. 17.53/5.69 * If the deque does not contain the element, it is unchanged. 17.53/5.69 * More formally, removes the first element e such that 17.53/5.69 * (o==null ? e==null : o.equals(e)) 17.53/5.69 * (if such an element exists). 17.53/5.69 * Returns true if this deque contained the specified element 17.53/5.69 * (or equivalently, if this deque changed as a result of the call). 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #removeFirstOccurrence}. 17.53/5.69 * 17.53/5.69 * @param o element to be removed from this deque, if present 17.53/5.69 * @return true if an element was removed as a result of this call 17.53/5.69 * @throws ClassCastException if the class of the specified element 17.53/5.69 * is incompatible with this deque (optional) 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * deque does not permit null elements (optional) 17.53/5.69 */ 17.53/5.69 boolean remove(Object o); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns true if this deque contains the specified element. 17.53/5.69 * More formally, returns true if and only if this deque contains 17.53/5.69 * at least one element e such that 17.53/5.69 * (o==null ? e==null : o.equals(e)). 17.53/5.69 * 17.53/5.69 * @param o element whose presence in this deque is to be tested 17.53/5.69 * @return true if this deque contains the specified element 17.53/5.69 * @throws ClassCastException if the type of the specified element 17.53/5.69 * is incompatible with this deque (optional) 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * deque does not permit null elements (optional) 17.53/5.69 */ 17.53/5.69 boolean contains(Object o); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the number of elements in this deque. 17.53/5.69 * 17.53/5.69 * @return the number of elements in this deque 17.53/5.69 */ 17.53/5.69 public int size(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns an iterator over the elements in this deque in proper sequence. 17.53/5.69 * The elements will be returned in order from first (head) to last (tail). 17.53/5.69 * 17.53/5.69 * @return an iterator over the elements in this deque in proper sequence 17.53/5.69 */ 17.53/5.69 Iterator iterator(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns an iterator over the elements in this deque in reverse 17.53/5.69 * sequential order. The elements will be returned in order from 17.53/5.69 * last (tail) to first (head). 17.53/5.69 * 17.53/5.69 * @return an iterator over the elements in this deque in reverse 17.53/5.69 * sequence 17.53/5.69 */ 17.53/5.69 Iterator descendingIterator(); 17.53/5.69 17.53/5.69 } 17.53/5.69 17.53/5.69 17.53/5.69 /* 17.53/5.69 * Copyright 1994-2003 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.69 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.69 * 17.53/5.69 * This code is free software; you can redistribute it and/or modify it 17.53/5.69 * under the terms of the GNU General Public License version 2 only, as 17.53/5.69 * published by the Free Software Foundation. Sun designates this 17.53/5.69 * particular file as subject to the "Classpath" exception as provided 17.53/5.69 * by Sun in the LICENSE file that accompanied this code. 17.53/5.69 * 17.53/5.69 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.69 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.69 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.69 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.69 * accompanied this code). 17.53/5.69 * 17.53/5.69 * You should have received a copy of the GNU General Public License version 17.53/5.69 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.69 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.69 * 17.53/5.69 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.69 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.69 * have any questions. 17.53/5.69 */ 17.53/5.69 17.53/5.69 package javaUtilEx; 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Thrown to indicate that a method has been passed an illegal or 17.53/5.69 * inappropriate argument. 17.53/5.69 * 17.53/5.69 * @author unascribed 17.53/5.69 * @see java.lang.Thread#setPriority(int) 17.53/5.69 * @since JDK1.0 17.53/5.69 */ 17.53/5.69 public 17.53/5.69 class IllegalArgumentException extends RuntimeException { 17.53/5.69 /** 17.53/5.69 * Constructs an IllegalArgumentException with no 17.53/5.69 * detail message. 17.53/5.69 */ 17.53/5.69 public IllegalArgumentException() { 17.53/5.69 super(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Constructs an IllegalArgumentException with the 17.53/5.69 * specified detail message. 17.53/5.69 * 17.53/5.69 * @param s the detail message. 17.53/5.69 */ 17.53/5.69 public IllegalArgumentException(String s) { 17.53/5.69 super(s); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Constructs a new exception with the specified detail message and 17.53/5.69 * cause. 17.53/5.69 * 17.53/5.69 *

Note that the detail message associated with cause is 17.53/5.69 * not automatically incorporated in this exception's detail 17.53/5.69 * message. 17.53/5.69 * 17.53/5.69 * @param message the detail message (which is saved for later retrieval 17.53/5.69 * by the {@link Throwable#getMessage()} method). 17.53/5.69 * @param cause the cause (which is saved for later retrieval by the 17.53/5.69 * {@link Throwable#getCause()} method). (A null value 17.53/5.69 * is permitted, and indicates that the cause is nonexistent or 17.53/5.69 * unknown.) 17.53/5.69 * @since 1.5 17.53/5.69 */ 17.53/5.69 public IllegalArgumentException(String message, Throwable cause) { 17.53/5.69 super(message, cause); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Constructs a new exception with the specified cause and a detail 17.53/5.69 * message of (cause==null ? null : cause.toString()) (which 17.53/5.69 * typically contains the class and detail message of cause). 17.53/5.69 * This constructor is useful for exceptions that are little more than 17.53/5.69 * wrappers for other throwables (for example, {@link 17.53/5.69 * java.security.PrivilegedActionException}). 17.53/5.69 * 17.53/5.69 * @param cause the cause (which is saved for later retrieval by the 17.53/5.69 * {@link Throwable#getCause()} method). (A null value is 17.53/5.69 * permitted, and indicates that the cause is nonexistent or 17.53/5.69 * unknown.) 17.53/5.69 * @since 1.5 17.53/5.69 */ 17.53/5.69 public IllegalArgumentException(Throwable cause) { 17.53/5.69 super(cause); 17.53/5.69 } 17.53/5.69 17.53/5.69 private static final long serialVersionUID = -5365630128856068164L; 17.53/5.69 } 17.53/5.69 17.53/5.69 17.53/5.69 /* 17.53/5.69 * Copyright 1996-2003 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.69 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.69 * 17.53/5.69 * This code is free software; you can redistribute it and/or modify it 17.53/5.69 * under the terms of the GNU General Public License version 2 only, as 17.53/5.69 * published by the Free Software Foundation. Sun designates this 17.53/5.69 * particular file as subject to the "Classpath" exception as provided 17.53/5.69 * by Sun in the LICENSE file that accompanied this code. 17.53/5.69 * 17.53/5.69 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.69 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.69 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.69 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.69 * accompanied this code). 17.53/5.69 * 17.53/5.69 * You should have received a copy of the GNU General Public License version 17.53/5.69 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.69 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.69 * 17.53/5.69 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.69 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.69 * have any questions. 17.53/5.69 */ 17.53/5.69 17.53/5.69 package javaUtilEx; 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Signals that a method has been invoked at an illegal or 17.53/5.69 * inappropriate time. In other words, the Java environment or 17.53/5.69 * Java application is not in an appropriate state for the requested 17.53/5.69 * operation. 17.53/5.69 * 17.53/5.69 * @author Jonni Kanerva 17.53/5.69 * @since JDK1.1 17.53/5.69 */ 17.53/5.69 public 17.53/5.69 class IllegalStateException extends RuntimeException { 17.53/5.69 /** 17.53/5.69 * Constructs an IllegalStateException with no detail message. 17.53/5.69 * A detail message is a String that describes this particular exception. 17.53/5.69 */ 17.53/5.69 public IllegalStateException() { 17.53/5.69 super(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Constructs an IllegalStateException with the specified detail 17.53/5.69 * message. A detail message is a String that describes this particular 17.53/5.69 * exception. 17.53/5.69 * 17.53/5.69 * @param s the String that contains a detailed message 17.53/5.69 */ 17.53/5.69 public IllegalStateException(String s) { 17.53/5.69 super(s); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Constructs a new exception with the specified detail message and 17.53/5.69 * cause. 17.53/5.69 * 17.53/5.69 *

Note that the detail message associated with cause is 17.53/5.69 * not automatically incorporated in this exception's detail 17.53/5.69 * message. 17.53/5.69 * 17.53/5.69 * @param message the detail message (which is saved for later retrieval 17.53/5.69 * by the {@link Throwable#getMessage()} method). 17.53/5.69 * @param cause the cause (which is saved for later retrieval by the 17.53/5.69 * {@link Throwable#getCause()} method). (A null value 17.53/5.69 * is permitted, and indicates that the cause is nonexistent or 17.53/5.69 * unknown.) 17.53/5.69 * @since 1.5 17.53/5.69 */ 17.53/5.69 public IllegalStateException(String message, Throwable cause) { 17.53/5.69 super(message, cause); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Constructs a new exception with the specified cause and a detail 17.53/5.69 * message of (cause==null ? null : cause.toString()) (which 17.53/5.69 * typically contains the class and detail message of cause). 17.53/5.69 * This constructor is useful for exceptions that are little more than 17.53/5.69 * wrappers for other throwables (for example, {@link 17.53/5.69 * java.security.PrivilegedActionException}). 17.53/5.69 * 17.53/5.69 * @param cause the cause (which is saved for later retrieval by the 17.53/5.69 * {@link Throwable#getCause()} method). (A null value is 17.53/5.69 * permitted, and indicates that the cause is nonexistent or 17.53/5.69 * unknown.) 17.53/5.69 * @since 1.5 17.53/5.69 */ 17.53/5.69 public IllegalStateException(Throwable cause) { 17.53/5.69 super(cause); 17.53/5.69 } 17.53/5.69 17.53/5.69 static final long serialVersionUID = -1848914673093119416L; 17.53/5.69 } 17.53/5.69 17.53/5.69 17.53/5.69 /* 17.53/5.69 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.69 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.69 * 17.53/5.69 * This code is free software; you can redistribute it and/or modify it 17.53/5.69 * under the terms of the GNU General Public License version 2 only, as 17.53/5.69 * published by the Free Software Foundation. Sun designates this 17.53/5.69 * particular file as subject to the "Classpath" exception as provided 17.53/5.69 * by Sun in the LICENSE file that accompanied this code. 17.53/5.69 * 17.53/5.69 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.69 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.69 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.69 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.69 * accompanied this code). 17.53/5.69 * 17.53/5.69 * You should have received a copy of the GNU General Public License version 17.53/5.69 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.69 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.69 * 17.53/5.69 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.69 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.69 * have any questions. 17.53/5.69 */ 17.53/5.69 17.53/5.69 package javaUtilEx; 17.53/5.69 17.53/5.69 /** 17.53/5.69 * An iterator over a collection. {@code Iterator} takes the place of 17.53/5.69 * {@link Enumeration} in the Java Collections Framework. Iterators 17.53/5.69 * differ from enumerations in two ways: 17.53/5.69 * 17.53/5.69 *

17.53/5.69 * 17.53/5.69 *

This interface is a member of the 17.53/5.69 * 17.53/5.69 * Java Collections Framework. 17.53/5.69 * 17.53/5.69 * @author Josh Bloch 17.53/5.69 * @see Collection 17.53/5.69 * @see ListIterator 17.53/5.69 * @see Iterable 17.53/5.69 * @since 1.2 17.53/5.69 */ 17.53/5.69 public interface Iterator { 17.53/5.69 /** 17.53/5.69 * Returns {@code true} if the iteration has more elements. 17.53/5.69 * (In other words, returns {@code true} if {@link #next} would 17.53/5.69 * return an element rather than throwing an exception.) 17.53/5.69 * 17.53/5.69 * @return {@code true} if the iteration has more elements 17.53/5.69 */ 17.53/5.69 boolean hasNext(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the next element in the iteration. 17.53/5.69 * 17.53/5.69 * @return the next element in the iteration 17.53/5.69 * @throws NoSuchElementException if the iteration has no more elements 17.53/5.69 */ 17.53/5.69 E next(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes from the underlying collection the last element returned 17.53/5.69 * by this iterator (optional operation). This method can be called 17.53/5.69 * only once per call to {@link #next}. The behavior of an iterator 17.53/5.69 * is unspecified if the underlying collection is modified while the 17.53/5.69 * iteration is in progress in any way other than by calling this 17.53/5.69 * method. 17.53/5.69 * 17.53/5.69 * @throws UnsupportedOperationException if the {@code remove} 17.53/5.69 * operation is not supported by this iterator 17.53/5.69 * 17.53/5.69 * @throws IllegalStateException if the {@code next} method has not 17.53/5.69 * yet been called, or the {@code remove} method has already 17.53/5.69 * been called after the last call to the {@code next} 17.53/5.69 * method 17.53/5.69 */ 17.53/5.69 void remove(); 17.53/5.69 } 17.53/5.69 17.53/5.69 17.53/5.69 package javaUtilEx; 17.53/5.69 17.53/5.69 public class juLinkedListCreateRemoveLast { 17.53/5.69 public static void main(String[] args) { 17.53/5.69 Random.args = args; 17.53/5.69 17.53/5.69 LinkedList l = createList(Random.random()); 17.53/5.69 l.removeLast(); 17.53/5.69 } 17.53/5.69 17.53/5.69 public static LinkedList createList(int n) { 17.53/5.69 LinkedList l = new LinkedList(); 17.53/5.69 while (n > 0) { 17.53/5.69 l.addLast(new Content(Random.random())); 17.53/5.69 n--; 17.53/5.69 } 17.53/5.69 return l; 17.53/5.69 } 17.53/5.69 } 17.53/5.69 17.53/5.69 final class Content { 17.53/5.69 int val; 17.53/5.69 17.53/5.69 public Content(int v) { 17.53/5.69 this.val = v; 17.53/5.69 } 17.53/5.69 17.53/5.69 public int hashCode() { 17.53/5.69 return val^31; 17.53/5.69 } 17.53/5.69 17.53/5.69 public boolean equals(Object o) { 17.53/5.69 if (o instanceof Content) { 17.53/5.69 return this.val == ((Content) o).val; 17.53/5.69 } 17.53/5.69 return false; 17.53/5.69 } 17.53/5.69 } 17.53/5.69 17.53/5.69 17.53/5.69 /* 17.53/5.69 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.69 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.69 * 17.53/5.69 * This code is free software; you can redistribute it and/or modify it 17.53/5.69 * under the terms of the GNU General Public License version 2 only, as 17.53/5.69 * published by the Free Software Foundation. Sun designates this 17.53/5.69 * particular file as subject to the "Classpath" exception as provided 17.53/5.69 * by Sun in the LICENSE file that accompanied this code. 17.53/5.69 * 17.53/5.69 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.69 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.69 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.69 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.69 * accompanied this code). 17.53/5.69 * 17.53/5.69 * You should have received a copy of the GNU General Public License version 17.53/5.69 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.69 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.69 * 17.53/5.69 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.69 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.69 * have any questions. 17.53/5.69 */ 17.53/5.69 17.53/5.69 package javaUtilEx; 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Linked list implementation of the List interface. Implements all 17.53/5.69 * optional list operations, and permits all elements (including 17.53/5.69 * null). In addition to implementing the List interface, 17.53/5.69 * the LinkedList class provides uniformly named methods to 17.53/5.69 * get, remove and insert an element at the 17.53/5.69 * beginning and end of the list. These operations allow linked lists to be 17.53/5.69 * used as a stack, {@linkplain Queue queue}, or {@linkplain Deque 17.53/5.69 * double-ended queue}.

17.53/5.69 * 17.53/5.69 * The class implements the Deque interface, providing 17.53/5.69 * first-in-first-out queue operations for add, 17.53/5.69 * poll, along with other stack and deque operations.

17.53/5.69 * 17.53/5.69 * All of the operations perform as could be expected for a doubly-linked 17.53/5.69 * list. Operations that index into the list will traverse the list from 17.53/5.69 * the beginning or the end, whichever is closer to the specified index.

17.53/5.69 * 17.53/5.69 *

Note that this implementation is not synchronized. 17.53/5.69 * If multiple threads access a linked list concurrently, and at least 17.53/5.69 * one of the threads modifies the list structurally, it must be 17.53/5.69 * synchronized externally. (A structural modification is any operation 17.53/5.69 * that adds or deletes one or more elements; merely setting the value of 17.53/5.69 * an element is not a structural modification.) This is typically 17.53/5.69 * accomplished by synchronizing on some object that naturally 17.53/5.69 * encapsulates the list. 17.53/5.69 * 17.53/5.69 * If no such object exists, the list should be "wrapped" using the 17.53/5.69 * {@link Collections#synchronizedList Collections.synchronizedList} 17.53/5.69 * method. This is best done at creation time, to prevent accidental 17.53/5.69 * unsynchronized access to the list:

17.53/5.69	 *   List list = Collections.synchronizedList(new LinkedList(...));
17.53/5.69 * 17.53/5.69 *

The iterators returned by this class's iterator and 17.53/5.69 * listIterator methods are fail-fast: if the list is 17.53/5.69 * structurally modified at any time after the iterator is created, in 17.53/5.69 * any way except through the Iterator's own remove or 17.53/5.69 * add methods, the iterator will throw a {@link 17.53/5.69 * ConcurrentModificationException}. Thus, in the face of concurrent 17.53/5.69 * modification, the iterator fails quickly and cleanly, rather than 17.53/5.69 * risking arbitrary, non-deterministic behavior at an undetermined 17.53/5.69 * time in the future. 17.53/5.69 * 17.53/5.69 *

Note that the fail-fast behavior of an iterator cannot be guaranteed 17.53/5.69 * as it is, generally speaking, impossible to make any hard guarantees in the 17.53/5.69 * presence of unsynchronized concurrent modification. Fail-fast iterators 17.53/5.69 * throw ConcurrentModificationException on a best-effort basis. 17.53/5.69 * Therefore, it would be wrong to write a program that depended on this 17.53/5.69 * exception for its correctness: the fail-fast behavior of iterators 17.53/5.69 * should be used only to detect bugs. 17.53/5.69 * 17.53/5.69 *

This class is a member of the 17.53/5.69 * 17.53/5.69 * Java Collections Framework. 17.53/5.69 * 17.53/5.69 * @author Josh Bloch 17.53/5.69 * @see List 17.53/5.69 * @see ArrayList 17.53/5.69 * @see Vector 17.53/5.69 * @since 1.2 17.53/5.69 * @param the type of elements held in this collection 17.53/5.69 */ 17.53/5.69 17.53/5.69 public class LinkedList 17.53/5.69 extends AbstractSequentialList 17.53/5.69 implements List, Deque 17.53/5.69 { 17.53/5.69 private transient Entry header = new Entry(null, null, null); 17.53/5.69 private transient int size = 0; 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Constructs an empty list. 17.53/5.69 */ 17.53/5.69 public LinkedList() { 17.53/5.69 header.next = header.previous = header; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Constructs a list containing the elements of the specified 17.53/5.69 * collection, in the order they are returned by the collection's 17.53/5.69 * iterator. 17.53/5.69 * 17.53/5.69 * @param c the collection whose elements are to be placed into this list 17.53/5.69 * @throws NullPointerException if the specified collection is null 17.53/5.69 */ 17.53/5.69 public LinkedList(Collection c) { 17.53/5.69 this(); 17.53/5.69 addAll(c); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the first element in this list. 17.53/5.69 * 17.53/5.69 * @return the first element in this list 17.53/5.69 * @throws NoSuchElementException if this list is empty 17.53/5.69 */ 17.53/5.69 public E getFirst() { 17.53/5.69 if (size==0) 17.53/5.69 throw new NoSuchElementException(); 17.53/5.69 17.53/5.69 return header.next.element; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the last element in this list. 17.53/5.69 * 17.53/5.69 * @return the last element in this list 17.53/5.69 * @throws NoSuchElementException if this list is empty 17.53/5.69 */ 17.53/5.69 public E getLast() { 17.53/5.69 if (size==0) 17.53/5.69 throw new NoSuchElementException(); 17.53/5.69 17.53/5.69 return header.previous.element; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes and returns the first element from this list. 17.53/5.69 * 17.53/5.69 * @return the first element from this list 17.53/5.69 * @throws NoSuchElementException if this list is empty 17.53/5.69 */ 17.53/5.69 public E removeFirst() { 17.53/5.69 return remove(header.next); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes and returns the last element from this list. 17.53/5.69 * 17.53/5.69 * @return the last element from this list 17.53/5.69 * @throws NoSuchElementException if this list is empty 17.53/5.69 */ 17.53/5.69 public E removeLast() { 17.53/5.69 return remove(header.previous); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Inserts the specified element at the beginning of this list. 17.53/5.69 * 17.53/5.69 * @param e the element to add 17.53/5.69 */ 17.53/5.69 public void addFirst(E e) { 17.53/5.69 addBefore(e, header.next); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Appends the specified element to the end of this list. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #add}. 17.53/5.69 * 17.53/5.69 * @param e the element to add 17.53/5.69 */ 17.53/5.69 public void addLast(E e) { 17.53/5.69 addBefore(e, header); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns true if this list contains the specified element. 17.53/5.69 * More formally, returns true if and only if this list contains 17.53/5.69 * at least one element e such that 17.53/5.69 * (o==null ? e==null : o.equals(e)). 17.53/5.69 * 17.53/5.69 * @param o element whose presence in this list is to be tested 17.53/5.69 * @return true if this list contains the specified element 17.53/5.69 */ 17.53/5.69 public boolean contains(Object o) { 17.53/5.69 return indexOf(o) != -1; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the number of elements in this list. 17.53/5.69 * 17.53/5.69 * @return the number of elements in this list 17.53/5.69 */ 17.53/5.69 public int size() { 17.53/5.69 return size; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Appends the specified element to the end of this list. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #addLast}. 17.53/5.69 * 17.53/5.69 * @param e element to be appended to this list 17.53/5.69 * @return true (as specified by {@link Collection#add}) 17.53/5.69 */ 17.53/5.69 public boolean add(E e) { 17.53/5.69 addBefore(e, header); 17.53/5.69 return true; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes the first occurrence of the specified element from this list, 17.53/5.69 * if it is present. If this list does not contain the element, it is 17.53/5.69 * unchanged. More formally, removes the element with the lowest index 17.53/5.69 * i such that 17.53/5.69 * (o==null ? get(i)==null : o.equals(get(i))) 17.53/5.69 * (if such an element exists). Returns true if this list 17.53/5.69 * contained the specified element (or equivalently, if this list 17.53/5.69 * changed as a result of the call). 17.53/5.69 * 17.53/5.69 * @param o element to be removed from this list, if present 17.53/5.69 * @return true if this list contained the specified element 17.53/5.69 */ 17.53/5.69 public boolean remove(Object o) { 17.53/5.69 if (o==null) { 17.53/5.69 for (Entry e = header.next; e != header; e = e.next) { 17.53/5.69 if (e.element==null) { 17.53/5.69 remove(e); 17.53/5.69 return true; 17.53/5.69 } 17.53/5.69 } 17.53/5.69 } else { 17.53/5.69 for (Entry e = header.next; e != header; e = e.next) { 17.53/5.69 if (o.equals(e.element)) { 17.53/5.69 remove(e); 17.53/5.69 return true; 17.53/5.69 } 17.53/5.69 } 17.53/5.69 } 17.53/5.69 return false; 17.53/5.69 } 17.53/5.69 /** 17.53/5.69 * Removes all of the elements from this list. 17.53/5.69 */ 17.53/5.69 public void clear() { 17.53/5.69 Entry e = header.next; 17.53/5.69 while (e != header) { 17.53/5.69 Entry next = e.next; 17.53/5.69 e.next = e.previous = null; 17.53/5.69 e.element = null; 17.53/5.69 e = next; 17.53/5.69 } 17.53/5.69 header.next = header.previous = header; 17.53/5.69 size = 0; 17.53/5.69 modCount++; 17.53/5.69 } 17.53/5.69 17.53/5.69 17.53/5.69 // Positional Access Operations 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the element at the specified position in this list. 17.53/5.69 * 17.53/5.69 * @param index index of the element to return 17.53/5.69 * @return the element at the specified position in this list 17.53/5.69 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.69 */ 17.53/5.69 public E get(int index) { 17.53/5.69 return entry(index).element; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Replaces the element at the specified position in this list with the 17.53/5.69 * specified element. 17.53/5.69 * 17.53/5.69 * @param index index of the element to replace 17.53/5.69 * @param element element to be stored at the specified position 17.53/5.69 * @return the element previously at the specified position 17.53/5.69 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.69 */ 17.53/5.69 public E set(int index, E element) { 17.53/5.69 Entry e = entry(index); 17.53/5.69 E oldVal = e.element; 17.53/5.69 e.element = element; 17.53/5.69 return oldVal; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Inserts the specified element at the specified position in this list. 17.53/5.69 * Shifts the element currently at that position (if any) and any 17.53/5.69 * subsequent elements to the right (adds one to their indices). 17.53/5.69 * 17.53/5.69 * @param index index at which the specified element is to be inserted 17.53/5.69 * @param element element to be inserted 17.53/5.69 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.69 */ 17.53/5.69 public void add(int index, E element) { 17.53/5.69 addBefore(element, (index==size ? header : entry(index))); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes the element at the specified position in this list. Shifts any 17.53/5.69 * subsequent elements to the left (subtracts one from their indices). 17.53/5.69 * Returns the element that was removed from the list. 17.53/5.69 * 17.53/5.69 * @param index the index of the element to be removed 17.53/5.69 * @return the element previously at the specified position 17.53/5.69 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.69 */ 17.53/5.69 public E remove(int index) { 17.53/5.69 return remove(entry(index)); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the indexed entry. 17.53/5.69 */ 17.53/5.69 private Entry entry(int index) { 17.53/5.69 if (index < 0 || index >= size) 17.53/5.69 throw new IndexOutOfBoundsException(); 17.53/5.69 Entry e = header; 17.53/5.69 if (index < (size >> 1)) { 17.53/5.69 for (int i = 0; i <= index; i++) 17.53/5.69 e = e.next; 17.53/5.69 } else { 17.53/5.69 for (int i = size; i > index; i--) 17.53/5.69 e = e.previous; 17.53/5.69 } 17.53/5.69 return e; 17.53/5.69 } 17.53/5.69 17.53/5.69 17.53/5.69 // Search Operations 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the index of the first occurrence of the specified element 17.53/5.69 * in this list, or -1 if this list does not contain the element. 17.53/5.69 * More formally, returns the lowest index i such that 17.53/5.69 * (o==null ? get(i)==null : o.equals(get(i))), 17.53/5.69 * or -1 if there is no such index. 17.53/5.69 * 17.53/5.69 * @param o element to search for 17.53/5.69 * @return the index of the first occurrence of the specified element in 17.53/5.69 * this list, or -1 if this list does not contain the element 17.53/5.69 */ 17.53/5.69 public int indexOf(Object o) { 17.53/5.69 int index = 0; 17.53/5.69 if (o==null) { 17.53/5.69 for (Entry e = header.next; e != header; e = e.next) { 17.53/5.69 if (e.element==null) 17.53/5.69 return index; 17.53/5.69 index++; 17.53/5.69 } 17.53/5.69 } else { 17.53/5.69 for (Entry e = header.next; e != header; e = e.next) { 17.53/5.69 if (o.equals(e.element)) 17.53/5.69 return index; 17.53/5.69 index++; 17.53/5.69 } 17.53/5.69 } 17.53/5.69 return -1; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the index of the last occurrence of the specified element 17.53/5.69 * in this list, or -1 if this list does not contain the element. 17.53/5.69 * More formally, returns the highest index i such that 17.53/5.69 * (o==null ? get(i)==null : o.equals(get(i))), 17.53/5.69 * or -1 if there is no such index. 17.53/5.69 * 17.53/5.69 * @param o element to search for 17.53/5.69 * @return the index of the last occurrence of the specified element in 17.53/5.69 * this list, or -1 if this list does not contain the element 17.53/5.69 */ 17.53/5.69 public int lastIndexOf(Object o) { 17.53/5.69 int index = size; 17.53/5.69 if (o==null) { 17.53/5.69 for (Entry e = header.previous; e != header; e = e.previous) { 17.53/5.69 index--; 17.53/5.69 if (e.element==null) 17.53/5.69 return index; 17.53/5.69 } 17.53/5.69 } else { 17.53/5.69 for (Entry e = header.previous; e != header; e = e.previous) { 17.53/5.69 index--; 17.53/5.69 if (o.equals(e.element)) 17.53/5.69 return index; 17.53/5.69 } 17.53/5.69 } 17.53/5.69 return -1; 17.53/5.69 } 17.53/5.69 17.53/5.69 // Queue operations. 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves, but does not remove, the head (first element) of this list. 17.53/5.69 * @return the head of this list, or null if this list is empty 17.53/5.69 * @since 1.5 17.53/5.69 */ 17.53/5.69 public E peek() { 17.53/5.69 if (size==0) 17.53/5.69 return null; 17.53/5.69 return getFirst(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves, but does not remove, the head (first element) of this list. 17.53/5.69 * @return the head of this list 17.53/5.69 * @throws NoSuchElementException if this list is empty 17.53/5.69 * @since 1.5 17.53/5.69 */ 17.53/5.69 public E element() { 17.53/5.69 return getFirst(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves and removes the head (first element) of this list 17.53/5.69 * @return the head of this list, or null if this list is empty 17.53/5.69 * @since 1.5 17.53/5.69 */ 17.53/5.69 public E poll() { 17.53/5.69 if (size==0) 17.53/5.69 return null; 17.53/5.69 return removeFirst(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves and removes the head (first element) of this list. 17.53/5.69 * 17.53/5.69 * @return the head of this list 17.53/5.69 * @throws NoSuchElementException if this list is empty 17.53/5.69 * @since 1.5 17.53/5.69 */ 17.53/5.69 public E remove() { 17.53/5.69 return removeFirst(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Adds the specified element as the tail (last element) of this list. 17.53/5.69 * 17.53/5.69 * @param e the element to add 17.53/5.69 * @return true (as specified by {@link Queue#offer}) 17.53/5.69 * @since 1.5 17.53/5.69 */ 17.53/5.69 public boolean offer(E e) { 17.53/5.69 return add(e); 17.53/5.69 } 17.53/5.69 17.53/5.69 // Deque operations 17.53/5.69 /** 17.53/5.69 * Inserts the specified element at the front of this list. 17.53/5.69 * 17.53/5.69 * @param e the element to insert 17.53/5.69 * @return true (as specified by {@link Deque#offerFirst}) 17.53/5.69 * @since 1.6 17.53/5.69 */ 17.53/5.69 public boolean offerFirst(E e) { 17.53/5.69 addFirst(e); 17.53/5.69 return true; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Inserts the specified element at the end of this list. 17.53/5.69 * 17.53/5.69 * @param e the element to insert 17.53/5.69 * @return true (as specified by {@link Deque#offerLast}) 17.53/5.69 * @since 1.6 17.53/5.69 */ 17.53/5.69 public boolean offerLast(E e) { 17.53/5.69 addLast(e); 17.53/5.69 return true; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves, but does not remove, the first element of this list, 17.53/5.69 * or returns null if this list is empty. 17.53/5.69 * 17.53/5.69 * @return the first element of this list, or null 17.53/5.69 * if this list is empty 17.53/5.69 * @since 1.6 17.53/5.69 */ 17.53/5.69 public E peekFirst() { 17.53/5.69 if (size==0) 17.53/5.69 return null; 17.53/5.69 return getFirst(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves, but does not remove, the last element of this list, 17.53/5.69 * or returns null if this list is empty. 17.53/5.69 * 17.53/5.69 * @return the last element of this list, or null 17.53/5.69 * if this list is empty 17.53/5.69 * @since 1.6 17.53/5.69 */ 17.53/5.69 public E peekLast() { 17.53/5.69 if (size==0) 17.53/5.69 return null; 17.53/5.69 return getLast(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves and removes the first element of this list, 17.53/5.69 * or returns null if this list is empty. 17.53/5.69 * 17.53/5.69 * @return the first element of this list, or null if 17.53/5.69 * this list is empty 17.53/5.69 * @since 1.6 17.53/5.69 */ 17.53/5.69 public E pollFirst() { 17.53/5.69 if (size==0) 17.53/5.69 return null; 17.53/5.69 return removeFirst(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retrieves and removes the last element of this list, 17.53/5.69 * or returns null if this list is empty. 17.53/5.69 * 17.53/5.69 * @return the last element of this list, or null if 17.53/5.69 * this list is empty 17.53/5.69 * @since 1.6 17.53/5.69 */ 17.53/5.69 public E pollLast() { 17.53/5.69 if (size==0) 17.53/5.69 return null; 17.53/5.69 return removeLast(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Pushes an element onto the stack represented by this list. In other 17.53/5.69 * words, inserts the element at the front of this list. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #addFirst}. 17.53/5.69 * 17.53/5.69 * @param e the element to push 17.53/5.69 * @since 1.6 17.53/5.69 */ 17.53/5.69 public void push(E e) { 17.53/5.69 addFirst(e); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Pops an element from the stack represented by this list. In other 17.53/5.69 * words, removes and returns the first element of this list. 17.53/5.69 * 17.53/5.69 *

This method is equivalent to {@link #removeFirst()}. 17.53/5.69 * 17.53/5.69 * @return the element at the front of this list (which is the top 17.53/5.69 * of the stack represented by this list) 17.53/5.69 * @throws NoSuchElementException if this list is empty 17.53/5.69 * @since 1.6 17.53/5.69 */ 17.53/5.69 public E pop() { 17.53/5.69 return removeFirst(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes the first occurrence of the specified element in this 17.53/5.69 * list (when traversing the list from head to tail). If the list 17.53/5.69 * does not contain the element, it is unchanged. 17.53/5.69 * 17.53/5.69 * @param o element to be removed from this list, if present 17.53/5.69 * @return true if the list contained the specified element 17.53/5.69 * @since 1.6 17.53/5.69 */ 17.53/5.69 public boolean removeFirstOccurrence(Object o) { 17.53/5.69 return remove(o); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes the last occurrence of the specified element in this 17.53/5.69 * list (when traversing the list from head to tail). If the list 17.53/5.69 * does not contain the element, it is unchanged. 17.53/5.69 * 17.53/5.69 * @param o element to be removed from this list, if present 17.53/5.69 * @return true if the list contained the specified element 17.53/5.69 * @since 1.6 17.53/5.69 */ 17.53/5.69 public boolean removeLastOccurrence(Object o) { 17.53/5.69 if (o==null) { 17.53/5.69 for (Entry e = header.previous; e != header; e = e.previous) { 17.53/5.69 if (e.element==null) { 17.53/5.69 remove(e); 17.53/5.69 return true; 17.53/5.69 } 17.53/5.69 } 17.53/5.69 } else { 17.53/5.69 for (Entry e = header.previous; e != header; e = e.previous) { 17.53/5.69 if (o.equals(e.element)) { 17.53/5.69 remove(e); 17.53/5.69 return true; 17.53/5.69 } 17.53/5.69 } 17.53/5.69 } 17.53/5.69 return false; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns a list-iterator of the elements in this list (in proper 17.53/5.69 * sequence), starting at the specified position in the list. 17.53/5.69 * Obeys the general contract of List.listIterator(int).

17.53/5.69 * 17.53/5.69 * The list-iterator is fail-fast: if the list is structurally 17.53/5.69 * modified at any time after the Iterator is created, in any way except 17.53/5.69 * through the list-iterator's own remove or add 17.53/5.69 * methods, the list-iterator will throw a 17.53/5.69 * ConcurrentModificationException. Thus, in the face of 17.53/5.69 * concurrent modification, the iterator fails quickly and cleanly, rather 17.53/5.69 * than risking arbitrary, non-deterministic behavior at an undetermined 17.53/5.69 * time in the future. 17.53/5.69 * 17.53/5.69 * @param index index of the first element to be returned from the 17.53/5.69 * list-iterator (by a call to next) 17.53/5.69 * @return a ListIterator of the elements in this list (in proper 17.53/5.69 * sequence), starting at the specified position in the list 17.53/5.69 * @throws IndexOutOfBoundsException {@inheritDoc} 17.53/5.69 * @see List#listIterator(int) 17.53/5.69 */ 17.53/5.69 public ListIterator listIterator(int index) { 17.53/5.69 return new ListItr(index); 17.53/5.69 } 17.53/5.69 17.53/5.69 private class ListItr implements ListIterator { 17.53/5.69 private Entry lastReturned = header; 17.53/5.69 private Entry next; 17.53/5.69 private int nextIndex; 17.53/5.69 private int expectedModCount = modCount; 17.53/5.69 17.53/5.69 ListItr(int index) { 17.53/5.69 if (index < 0 || index > size) 17.53/5.69 throw new IndexOutOfBoundsException(); 17.53/5.69 if (index < (size >> 1)) { 17.53/5.69 next = header.next; 17.53/5.69 for (nextIndex=0; nextIndexindex; nextIndex--) 17.53/5.69 next = next.previous; 17.53/5.69 } 17.53/5.69 } 17.53/5.69 17.53/5.69 public boolean hasNext() { 17.53/5.69 return nextIndex != size; 17.53/5.69 } 17.53/5.69 17.53/5.69 public E next() { 17.53/5.69 checkForComodification(); 17.53/5.69 if (nextIndex == size) 17.53/5.69 throw new NoSuchElementException(); 17.53/5.69 17.53/5.69 lastReturned = next; 17.53/5.69 next = next.next; 17.53/5.69 nextIndex++; 17.53/5.69 return lastReturned.element; 17.53/5.69 } 17.53/5.69 17.53/5.69 public boolean hasPrevious() { 17.53/5.69 return nextIndex != 0; 17.53/5.69 } 17.53/5.69 17.53/5.69 public E previous() { 17.53/5.69 if (nextIndex == 0) 17.53/5.69 throw new NoSuchElementException(); 17.53/5.69 17.53/5.69 lastReturned = next = next.previous; 17.53/5.69 nextIndex--; 17.53/5.69 checkForComodification(); 17.53/5.69 return lastReturned.element; 17.53/5.69 } 17.53/5.69 17.53/5.69 public int nextIndex() { 17.53/5.69 return nextIndex; 17.53/5.69 } 17.53/5.69 17.53/5.69 public int previousIndex() { 17.53/5.69 return nextIndex-1; 17.53/5.69 } 17.53/5.69 17.53/5.69 public void remove() { 17.53/5.69 checkForComodification(); 17.53/5.69 Entry lastNext = lastReturned.next; 17.53/5.69 try { 17.53/5.69 LinkedList.this.remove(lastReturned); 17.53/5.69 } catch (NoSuchElementException e) { 17.53/5.69 throw new IllegalStateException(); 17.53/5.69 } 17.53/5.69 if (next==lastReturned) 17.53/5.69 next = lastNext; 17.53/5.69 else 17.53/5.69 nextIndex--; 17.53/5.69 lastReturned = header; 17.53/5.69 expectedModCount++; 17.53/5.69 } 17.53/5.69 17.53/5.69 public void set(E e) { 17.53/5.69 if (lastReturned == header) 17.53/5.69 throw new IllegalStateException(); 17.53/5.69 checkForComodification(); 17.53/5.69 lastReturned.element = e; 17.53/5.69 } 17.53/5.69 17.53/5.69 public void add(E e) { 17.53/5.69 checkForComodification(); 17.53/5.69 lastReturned = header; 17.53/5.69 addBefore(e, next); 17.53/5.69 nextIndex++; 17.53/5.69 expectedModCount++; 17.53/5.69 } 17.53/5.69 17.53/5.69 final void checkForComodification() { 17.53/5.69 if (modCount != expectedModCount) 17.53/5.69 throw new ConcurrentModificationException(); 17.53/5.69 } 17.53/5.69 } 17.53/5.69 17.53/5.69 private static class Entry { 17.53/5.69 E element; 17.53/5.69 Entry next; 17.53/5.69 Entry previous; 17.53/5.69 17.53/5.69 Entry(E element, Entry next, Entry previous) { 17.53/5.69 this.element = element; 17.53/5.69 this.next = next; 17.53/5.69 this.previous = previous; 17.53/5.69 } 17.53/5.69 } 17.53/5.69 17.53/5.69 private Entry addBefore(E e, Entry entry) { 17.53/5.69 Entry newEntry = new Entry(e, entry, entry.previous); 17.53/5.69 newEntry.previous.next = newEntry; 17.53/5.69 newEntry.next.previous = newEntry; 17.53/5.69 size++; 17.53/5.69 modCount++; 17.53/5.69 return newEntry; 17.53/5.69 } 17.53/5.69 17.53/5.69 private E remove(Entry e) { 17.53/5.69 if (e == header) 17.53/5.69 throw new NoSuchElementException(); 17.53/5.69 17.53/5.69 E result = e.element; 17.53/5.69 e.previous.next = e.next; 17.53/5.69 e.next.previous = e.previous; 17.53/5.69 e.next = e.previous = null; 17.53/5.69 e.element = null; 17.53/5.69 size--; 17.53/5.69 modCount++; 17.53/5.69 return result; 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * @since 1.6 17.53/5.69 */ 17.53/5.69 public Iterator descendingIterator() { 17.53/5.69 return new DescendingIterator(); 17.53/5.69 } 17.53/5.69 17.53/5.69 /** Adapter to provide descending iterators via ListItr.previous */ 17.53/5.69 private class DescendingIterator implements Iterator { 17.53/5.69 final ListItr itr = new ListItr(size()); 17.53/5.69 public boolean hasNext() { 17.53/5.69 return itr.hasPrevious(); 17.53/5.69 } 17.53/5.69 public E next() { 17.53/5.69 return itr.previous(); 17.53/5.69 } 17.53/5.69 public void remove() { 17.53/5.69 itr.remove(); 17.53/5.69 } 17.53/5.69 } 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns an array containing all of the elements in this list 17.53/5.69 * in proper sequence (from first to last element). 17.53/5.69 * 17.53/5.69 *

The returned array will be "safe" in that no references to it are 17.53/5.69 * maintained by this list. (In other words, this method must allocate 17.53/5.69 * a new array). The caller is thus free to modify the returned array. 17.53/5.69 * 17.53/5.69 *

This method acts as bridge between array-based and collection-based 17.53/5.69 * APIs. 17.53/5.69 * 17.53/5.69 * @return an array containing all of the elements in this list 17.53/5.69 * in proper sequence 17.53/5.69 */ 17.53/5.69 public Object[] toArray() { 17.53/5.69 Object[] result = new Object[size]; 17.53/5.69 int i = 0; 17.53/5.69 for (Entry e = header.next; e != header; e = e.next) 17.53/5.69 result[i++] = e.element; 17.53/5.69 return result; 17.53/5.69 } 17.53/5.69 17.53/5.69 private static final long serialVersionUID = 876323262645176354L; 17.53/5.69 } 17.53/5.69 17.53/5.69 17.53/5.69 /* 17.53/5.69 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.69 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.69 * 17.53/5.69 * This code is free software; you can redistribute it and/or modify it 17.53/5.69 * under the terms of the GNU General Public License version 2 only, as 17.53/5.69 * published by the Free Software Foundation. Sun designates this 17.53/5.69 * particular file as subject to the "Classpath" exception as provided 17.53/5.69 * by Sun in the LICENSE file that accompanied this code. 17.53/5.69 * 17.53/5.69 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.69 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.69 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.69 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.69 * accompanied this code). 17.53/5.69 * 17.53/5.69 * You should have received a copy of the GNU General Public License version 17.53/5.69 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.69 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.69 * 17.53/5.69 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.69 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.69 * have any questions. 17.53/5.69 */ 17.53/5.69 17.53/5.69 package javaUtilEx; 17.53/5.69 17.53/5.69 /** 17.53/5.69 * An iterator for lists that allows the programmer 17.53/5.69 * to traverse the list in either direction, modify 17.53/5.69 * the list during iteration, and obtain the iterator's 17.53/5.69 * current position in the list. A {@code ListIterator} 17.53/5.69 * has no current element; its cursor position always 17.53/5.69 * lies between the element that would be returned by a call 17.53/5.69 * to {@code previous()} and the element that would be 17.53/5.69 * returned by a call to {@code next()}. 17.53/5.69 * An iterator for a list of length {@code n} has {@code n+1} possible 17.53/5.69 * cursor positions, as illustrated by the carets ({@code ^}) below: 17.53/5.69 *

17.53/5.69	 *                      Element(0)   Element(1)   Element(2)   ... Element(n-1)
17.53/5.69	 * cursor positions:  ^            ^            ^            ^                  ^
17.53/5.69	 * 
17.53/5.69 * Note that the {@link #remove} and {@link #set(Object)} methods are 17.53/5.69 * not defined in terms of the cursor position; they are defined to 17.53/5.69 * operate on the last element returned by a call to {@link #next} or 17.53/5.69 * {@link #previous()}. 17.53/5.69 * 17.53/5.69 *

This interface is a member of the 17.53/5.69 * 17.53/5.69 * Java Collections Framework. 17.53/5.69 * 17.53/5.69 * @author Josh Bloch 17.53/5.69 * @see Collection 17.53/5.69 * @see List 17.53/5.69 * @see Iterator 17.53/5.69 * @see Enumeration 17.53/5.69 * @see List#listIterator() 17.53/5.69 * @since 1.2 17.53/5.69 */ 17.53/5.69 public interface ListIterator extends Iterator { 17.53/5.69 // Query Operations 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns {@code true} if this list iterator has more elements when 17.53/5.69 * traversing the list in the forward direction. (In other words, 17.53/5.69 * returns {@code true} if {@link #next} would return an element rather 17.53/5.69 * than throwing an exception.) 17.53/5.69 * 17.53/5.69 * @return {@code true} if the list iterator has more elements when 17.53/5.69 * traversing the list in the forward direction 17.53/5.69 */ 17.53/5.69 boolean hasNext(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the next element in the list and advances the cursor position. 17.53/5.69 * This method may be called repeatedly to iterate through the list, 17.53/5.69 * or intermixed with calls to {@link #previous} to go back and forth. 17.53/5.69 * (Note that alternating calls to {@code next} and {@code previous} 17.53/5.69 * will return the same element repeatedly.) 17.53/5.69 * 17.53/5.69 * @return the next element in the list 17.53/5.69 * @throws NoSuchElementException if the iteration has no next element 17.53/5.69 */ 17.53/5.69 E next(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns {@code true} if this list iterator has more elements when 17.53/5.69 * traversing the list in the reverse direction. (In other words, 17.53/5.69 * returns {@code true} if {@link #previous} would return an element 17.53/5.69 * rather than throwing an exception.) 17.53/5.69 * 17.53/5.69 * @return {@code true} if the list iterator has more elements when 17.53/5.69 * traversing the list in the reverse direction 17.53/5.69 */ 17.53/5.69 boolean hasPrevious(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the previous element in the list and moves the cursor 17.53/5.69 * position backwards. This method may be called repeatedly to 17.53/5.69 * iterate through the list backwards, or intermixed with calls to 17.53/5.69 * {@link #next} to go back and forth. (Note that alternating calls 17.53/5.69 * to {@code next} and {@code previous} will return the same 17.53/5.69 * element repeatedly.) 17.53/5.69 * 17.53/5.69 * @return the previous element in the list 17.53/5.69 * @throws NoSuchElementException if the iteration has no previous 17.53/5.69 * element 17.53/5.69 */ 17.53/5.69 E previous(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the index of the element that would be returned by a 17.53/5.69 * subsequent call to {@link #next}. (Returns list size if the list 17.53/5.69 * iterator is at the end of the list.) 17.53/5.69 * 17.53/5.69 * @return the index of the element that would be returned by a 17.53/5.69 * subsequent call to {@code next}, or list size if the list 17.53/5.69 * iterator is at the end of the list 17.53/5.69 */ 17.53/5.69 int nextIndex(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the index of the element that would be returned by a 17.53/5.69 * subsequent call to {@link #previous}. (Returns -1 if the list 17.53/5.69 * iterator is at the beginning of the list.) 17.53/5.69 * 17.53/5.69 * @return the index of the element that would be returned by a 17.53/5.69 * subsequent call to {@code previous}, or -1 if the list 17.53/5.69 * iterator is at the beginning of the list 17.53/5.69 */ 17.53/5.69 int previousIndex(); 17.53/5.69 17.53/5.69 17.53/5.69 // Modification Operations 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes from the list the last element that was returned by {@link 17.53/5.69 * #next} or {@link #previous} (optional operation). This call can 17.53/5.69 * only be made once per call to {@code next} or {@code previous}. 17.53/5.69 * It can be made only if {@link #add} has not been 17.53/5.69 * called after the last call to {@code next} or {@code previous}. 17.53/5.69 * 17.53/5.69 * @throws UnsupportedOperationException if the {@code remove} 17.53/5.69 * operation is not supported by this list iterator 17.53/5.69 * @throws IllegalStateException if neither {@code next} nor 17.53/5.69 * {@code previous} have been called, or {@code remove} or 17.53/5.69 * {@code add} have been called after the last call to 17.53/5.69 * {@code next} or {@code previous} 17.53/5.69 */ 17.53/5.69 void remove(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Replaces the last element returned by {@link #next} or 17.53/5.69 * {@link #previous} with the specified element (optional operation). 17.53/5.69 * This call can be made only if neither {@link #remove} nor {@link 17.53/5.69 * #add} have been called after the last call to {@code next} or 17.53/5.69 * {@code previous}. 17.53/5.69 * 17.53/5.69 * @param e the element with which to replace the last element returned by 17.53/5.69 * {@code next} or {@code previous} 17.53/5.69 * @throws UnsupportedOperationException if the {@code set} operation 17.53/5.69 * is not supported by this list iterator 17.53/5.69 * @throws ClassCastException if the class of the specified element 17.53/5.69 * prevents it from being added to this list 17.53/5.69 * @throws IllegalArgumentException if some aspect of the specified 17.53/5.69 * element prevents it from being added to this list 17.53/5.69 * @throws IllegalStateException if neither {@code next} nor 17.53/5.69 * {@code previous} have been called, or {@code remove} or 17.53/5.69 * {@code add} have been called after the last call to 17.53/5.69 * {@code next} or {@code previous} 17.53/5.69 */ 17.53/5.69 void set(E e); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Inserts the specified element into the list (optional operation). 17.53/5.69 * The element is inserted immediately before the next element that 17.53/5.69 * would be returned by {@link #next}, if any, and after the next 17.53/5.69 * element that would be returned by {@link #previous}, if any. (If the 17.53/5.69 * list contains no elements, the new element becomes the sole element 17.53/5.69 * on the list.) The new element is inserted before the implicit 17.53/5.69 * cursor: a subsequent call to {@code next} would be unaffected, and a 17.53/5.69 * subsequent call to {@code previous} would return the new element. 17.53/5.69 * (This call increases by one the value that would be returned by a 17.53/5.69 * call to {@code nextIndex} or {@code previousIndex}.) 17.53/5.69 * 17.53/5.69 * @param e the element to insert 17.53/5.69 * @throws UnsupportedOperationException if the {@code add} method is 17.53/5.69 * not supported by this list iterator 17.53/5.69 * @throws ClassCastException if the class of the specified element 17.53/5.69 * prevents it from being added to this list 17.53/5.69 * @throws IllegalArgumentException if some aspect of this element 17.53/5.69 * prevents it from being added to this list 17.53/5.69 */ 17.53/5.69 void add(E e); 17.53/5.69 } 17.53/5.69 17.53/5.69 17.53/5.69 /* 17.53/5.69 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.69 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.69 * 17.53/5.69 * This code is free software; you can redistribute it and/or modify it 17.53/5.69 * under the terms of the GNU General Public License version 2 only, as 17.53/5.69 * published by the Free Software Foundation. Sun designates this 17.53/5.69 * particular file as subject to the "Classpath" exception as provided 17.53/5.69 * by Sun in the LICENSE file that accompanied this code. 17.53/5.69 * 17.53/5.69 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.69 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.69 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.69 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.69 * accompanied this code). 17.53/5.69 * 17.53/5.69 * You should have received a copy of the GNU General Public License version 17.53/5.69 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.69 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.69 * 17.53/5.69 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.69 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.69 * have any questions. 17.53/5.69 */ 17.53/5.69 17.53/5.69 package javaUtilEx; 17.53/5.69 17.53/5.69 /** 17.53/5.69 * An ordered collection (also known as a sequence). The user of this 17.53/5.69 * interface has precise control over where in the list each element is 17.53/5.69 * inserted. The user can access elements by their integer index (position in 17.53/5.69 * the list), and search for elements in the list.

17.53/5.69 * 17.53/5.69 * Unlike sets, lists typically allow duplicate elements. More formally, 17.53/5.69 * lists typically allow pairs of elements e1 and e2 17.53/5.69 * such that e1.equals(e2), and they typically allow multiple 17.53/5.69 * null elements if they allow null elements at all. It is not inconceivable 17.53/5.69 * that someone might wish to implement a list that prohibits duplicates, by 17.53/5.69 * throwing runtime exceptions when the user attempts to insert them, but we 17.53/5.69 * expect this usage to be rare.

17.53/5.69 * 17.53/5.69 * The List interface places additional stipulations, beyond those 17.53/5.69 * specified in the Collection interface, on the contracts of the 17.53/5.69 * iterator, add, remove, equals, and 17.53/5.69 * hashCode methods. Declarations for other inherited methods are 17.53/5.69 * also included here for convenience.

17.53/5.69 * 17.53/5.69 * The List interface provides four methods for positional (indexed) 17.53/5.69 * access to list elements. Lists (like Java arrays) are zero based. Note 17.53/5.69 * that these operations may execute in time proportional to the index value 17.53/5.69 * for some implementations (the LinkedList class, for 17.53/5.69 * example). Thus, iterating over the elements in a list is typically 17.53/5.69 * preferable to indexing through it if the caller does not know the 17.53/5.69 * implementation.

17.53/5.69 * 17.53/5.69 * The List interface provides a special iterator, called a 17.53/5.69 * ListIterator, that allows element insertion and replacement, and 17.53/5.69 * bidirectional access in addition to the normal operations that the 17.53/5.69 * Iterator interface provides. A method is provided to obtain a 17.53/5.69 * list iterator that starts at a specified position in the list.

17.53/5.69 * 17.53/5.69 * The List interface provides two methods to search for a specified 17.53/5.69 * object. From a performance standpoint, these methods should be used with 17.53/5.69 * caution. In many implementations they will perform costly linear 17.53/5.69 * searches.

17.53/5.69 * 17.53/5.69 * The List interface provides two methods to efficiently insert and 17.53/5.69 * remove multiple elements at an arbitrary point in the list.

17.53/5.69 * 17.53/5.69 * Note: While it is permissible for lists to contain themselves as elements, 17.53/5.69 * extreme caution is advised: the equals and hashCode 17.53/5.69 * methods are no longer well defined on such a list. 17.53/5.69 * 17.53/5.69 *

Some list implementations have restrictions on the elements that 17.53/5.69 * they may contain. For example, some implementations prohibit null elements, 17.53/5.69 * and some have restrictions on the types of their elements. Attempting to 17.53/5.69 * add an ineligible element throws an unchecked exception, typically 17.53/5.69 * NullPointerException or ClassCastException. Attempting 17.53/5.69 * to query the presence of an ineligible element may throw an exception, 17.53/5.69 * or it may simply return false; some implementations will exhibit the former 17.53/5.69 * behavior and some will exhibit the latter. More generally, attempting an 17.53/5.69 * operation on an ineligible element whose completion would not result in 17.53/5.69 * the insertion of an ineligible element into the list may throw an 17.53/5.69 * exception or it may succeed, at the option of the implementation. 17.53/5.69 * Such exceptions are marked as "optional" in the specification for this 17.53/5.69 * interface. 17.53/5.69 * 17.53/5.69 *

This interface is a member of the 17.53/5.69 * 17.53/5.69 * Java Collections Framework. 17.53/5.69 * 17.53/5.69 * @author Josh Bloch 17.53/5.69 * @author Neal Gafter 17.53/5.69 * @see Collection 17.53/5.69 * @see Set 17.53/5.69 * @see ArrayList 17.53/5.69 * @see LinkedList 17.53/5.69 * @see Vector 17.53/5.69 * @see Arrays#asList(Object[]) 17.53/5.69 * @see Collections#nCopies(int, Object) 17.53/5.69 * @see Collections#EMPTY_LIST 17.53/5.69 * @see AbstractList 17.53/5.69 * @see AbstractSequentialList 17.53/5.69 * @since 1.2 17.53/5.69 */ 17.53/5.69 17.53/5.69 public interface List extends Collection { 17.53/5.69 // Query Operations 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the number of elements in this list. If this list contains 17.53/5.69 * more than Integer.MAX_VALUE elements, returns 17.53/5.69 * Integer.MAX_VALUE. 17.53/5.69 * 17.53/5.69 * @return the number of elements in this list 17.53/5.69 */ 17.53/5.69 int size(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns true if this list contains no elements. 17.53/5.69 * 17.53/5.69 * @return true if this list contains no elements 17.53/5.69 */ 17.53/5.69 boolean isEmpty(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns true if this list contains the specified element. 17.53/5.69 * More formally, returns true if and only if this list contains 17.53/5.69 * at least one element e such that 17.53/5.69 * (o==null ? e==null : o.equals(e)). 17.53/5.69 * 17.53/5.69 * @param o element whose presence in this list is to be tested 17.53/5.69 * @return true if this list contains the specified element 17.53/5.69 * @throws ClassCastException if the type of the specified element 17.53/5.69 * is incompatible with this list (optional) 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * list does not permit null elements (optional) 17.53/5.69 */ 17.53/5.69 boolean contains(Object o); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns an iterator over the elements in this list in proper sequence. 17.53/5.69 * 17.53/5.69 * @return an iterator over the elements in this list in proper sequence 17.53/5.69 */ 17.53/5.69 Iterator iterator(); 17.53/5.69 17.53/5.69 // Modification Operations 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Appends the specified element to the end of this list (optional 17.53/5.69 * operation). 17.53/5.69 * 17.53/5.69 *

Lists that support this operation may place limitations on what 17.53/5.69 * elements may be added to this list. In particular, some 17.53/5.69 * lists will refuse to add null elements, and others will impose 17.53/5.69 * restrictions on the type of elements that may be added. List 17.53/5.69 * classes should clearly specify in their documentation any restrictions 17.53/5.69 * on what elements may be added. 17.53/5.69 * 17.53/5.69 * @param e element to be appended to this list 17.53/5.69 * @return true (as specified by {@link Collection#add}) 17.53/5.69 * @throws UnsupportedOperationException if the add operation 17.53/5.69 * is not supported by this list 17.53/5.69 * @throws ClassCastException if the class of the specified element 17.53/5.69 * prevents it from being added to this list 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * list does not permit null elements 17.53/5.69 * @throws IllegalArgumentException if some property of this element 17.53/5.69 * prevents it from being added to this list 17.53/5.69 */ 17.53/5.69 boolean add(E e); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes the first occurrence of the specified element from this list, 17.53/5.69 * if it is present (optional operation). If this list does not contain 17.53/5.69 * the element, it is unchanged. More formally, removes the element with 17.53/5.69 * the lowest index i such that 17.53/5.69 * (o==null ? get(i)==null : o.equals(get(i))) 17.53/5.69 * (if such an element exists). Returns true if this list 17.53/5.69 * contained the specified element (or equivalently, if this list changed 17.53/5.69 * as a result of the call). 17.53/5.69 * 17.53/5.69 * @param o element to be removed from this list, if present 17.53/5.69 * @return true if this list contained the specified element 17.53/5.69 * @throws ClassCastException if the type of the specified element 17.53/5.69 * is incompatible with this list (optional) 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * list does not permit null elements (optional) 17.53/5.69 * @throws UnsupportedOperationException if the remove operation 17.53/5.69 * is not supported by this list 17.53/5.69 */ 17.53/5.69 boolean remove(Object o); 17.53/5.69 17.53/5.69 17.53/5.69 // Bulk Modification Operations 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns true if this list contains all of the elements of the 17.53/5.69 * specified collection. 17.53/5.69 * 17.53/5.69 * @param c collection to be checked for containment in this list 17.53/5.69 * @return true if this list contains all of the elements of the 17.53/5.69 * specified collection 17.53/5.69 * @throws ClassCastException if the types of one or more elements 17.53/5.69 * in the specified collection are incompatible with this 17.53/5.69 * list (optional) 17.53/5.69 * @throws NullPointerException if the specified collection contains one 17.53/5.69 * or more null elements and this list does not permit null 17.53/5.69 * elements (optional), or if the specified collection is null 17.53/5.69 * @see #contains(Object) 17.53/5.69 */ 17.53/5.69 boolean containsAll(Collection c); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Appends all of the elements in the specified collection to the end of 17.53/5.69 * this list, in the order that they are returned by the specified 17.53/5.69 * collection's iterator (optional operation). The behavior of this 17.53/5.69 * operation is undefined if the specified collection is modified while 17.53/5.69 * the operation is in progress. (Note that this will occur if the 17.53/5.69 * specified collection is this list, and it's nonempty.) 17.53/5.69 * 17.53/5.69 * @param c collection containing elements to be added to this list 17.53/5.69 * @return true if this list changed as a result of the call 17.53/5.69 * @throws UnsupportedOperationException if the addAll operation 17.53/5.69 * is not supported by this list 17.53/5.69 * @throws ClassCastException if the class of an element of the specified 17.53/5.69 * collection prevents it from being added to this list 17.53/5.69 * @throws NullPointerException if the specified collection contains one 17.53/5.69 * or more null elements and this list does not permit null 17.53/5.69 * elements, or if the specified collection is null 17.53/5.69 * @throws IllegalArgumentException if some property of an element of the 17.53/5.69 * specified collection prevents it from being added to this list 17.53/5.69 * @see #add(Object) 17.53/5.69 */ 17.53/5.69 boolean addAll(Collection c); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Inserts all of the elements in the specified collection into this 17.53/5.69 * list at the specified position (optional operation). Shifts the 17.53/5.69 * element currently at that position (if any) and any subsequent 17.53/5.69 * elements to the right (increases their indices). The new elements 17.53/5.69 * will appear in this list in the order that they are returned by the 17.53/5.69 * specified collection's iterator. The behavior of this operation is 17.53/5.69 * undefined if the specified collection is modified while the 17.53/5.69 * operation is in progress. (Note that this will occur if the specified 17.53/5.69 * collection is this list, and it's nonempty.) 17.53/5.69 * 17.53/5.69 * @param index index at which to insert the first element from the 17.53/5.69 * specified collection 17.53/5.69 * @param c collection containing elements to be added to this list 17.53/5.69 * @return true if this list changed as a result of the call 17.53/5.69 * @throws UnsupportedOperationException if the addAll operation 17.53/5.69 * is not supported by this list 17.53/5.69 * @throws ClassCastException if the class of an element of the specified 17.53/5.69 * collection prevents it from being added to this list 17.53/5.69 * @throws NullPointerException if the specified collection contains one 17.53/5.69 * or more null elements and this list does not permit null 17.53/5.69 * elements, or if the specified collection is null 17.53/5.69 * @throws IllegalArgumentException if some property of an element of the 17.53/5.69 * specified collection prevents it from being added to this list 17.53/5.69 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.69 * (index < 0 || index > size()) 17.53/5.69 */ 17.53/5.69 boolean addAll(int index, Collection c); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes from this list all of its elements that are contained in the 17.53/5.69 * specified collection (optional operation). 17.53/5.69 * 17.53/5.69 * @param c collection containing elements to be removed from this list 17.53/5.69 * @return true if this list changed as a result of the call 17.53/5.69 * @throws UnsupportedOperationException if the removeAll operation 17.53/5.69 * is not supported by this list 17.53/5.69 * @throws ClassCastException if the class of an element of this list 17.53/5.69 * is incompatible with the specified collection (optional) 17.53/5.69 * @throws NullPointerException if this list contains a null element and the 17.53/5.69 * specified collection does not permit null elements (optional), 17.53/5.69 * or if the specified collection is null 17.53/5.69 * @see #remove(Object) 17.53/5.69 * @see #contains(Object) 17.53/5.69 */ 17.53/5.69 boolean removeAll(Collection c); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Retains only the elements in this list that are contained in the 17.53/5.69 * specified collection (optional operation). In other words, removes 17.53/5.69 * from this list all of its elements that are not contained in the 17.53/5.69 * specified collection. 17.53/5.69 * 17.53/5.69 * @param c collection containing elements to be retained in this list 17.53/5.69 * @return true if this list changed as a result of the call 17.53/5.69 * @throws UnsupportedOperationException if the retainAll operation 17.53/5.69 * is not supported by this list 17.53/5.69 * @throws ClassCastException if the class of an element of this list 17.53/5.69 * is incompatible with the specified collection (optional) 17.53/5.69 * @throws NullPointerException if this list contains a null element and the 17.53/5.69 * specified collection does not permit null elements (optional), 17.53/5.69 * or if the specified collection is null 17.53/5.69 * @see #remove(Object) 17.53/5.69 * @see #contains(Object) 17.53/5.69 */ 17.53/5.69 boolean retainAll(Collection c); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes all of the elements from this list (optional operation). 17.53/5.69 * The list will be empty after this call returns. 17.53/5.69 * 17.53/5.69 * @throws UnsupportedOperationException if the clear operation 17.53/5.69 * is not supported by this list 17.53/5.69 */ 17.53/5.69 void clear(); 17.53/5.69 17.53/5.69 17.53/5.69 // Comparison and hashing 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Compares the specified object with this list for equality. Returns 17.53/5.69 * true if and only if the specified object is also a list, both 17.53/5.69 * lists have the same size, and all corresponding pairs of elements in 17.53/5.69 * the two lists are equal. (Two elements e1 and 17.53/5.69 * e2 are equal if (e1==null ? e2==null : 17.53/5.69 * e1.equals(e2)).) In other words, two lists are defined to be 17.53/5.69 * equal if they contain the same elements in the same order. This 17.53/5.69 * definition ensures that the equals method works properly across 17.53/5.69 * different implementations of the List interface. 17.53/5.69 * 17.53/5.69 * @param o the object to be compared for equality with this list 17.53/5.69 * @return true if the specified object is equal to this list 17.53/5.69 */ 17.53/5.69 boolean equals(Object o); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the hash code value for this list. The hash code of a list 17.53/5.69 * is defined to be the result of the following calculation: 17.53/5.69 *

17.53/5.69	     *  int hashCode = 1;
17.53/5.69	     *  for (E e : list)
17.53/5.69	     *      hashCode = 31*hashCode + (e==null ? 0 : e.hashCode());
17.53/5.69	     * 
17.53/5.69 * This ensures that list1.equals(list2) implies that 17.53/5.69 * list1.hashCode()==list2.hashCode() for any two lists, 17.53/5.69 * list1 and list2, as required by the general 17.53/5.69 * contract of {@link Object#hashCode}. 17.53/5.69 * 17.53/5.69 * @return the hash code value for this list 17.53/5.69 * @see Object#equals(Object) 17.53/5.69 * @see #equals(Object) 17.53/5.69 */ 17.53/5.69 int hashCode(); 17.53/5.69 17.53/5.69 17.53/5.69 // Positional Access Operations 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the element at the specified position in this list. 17.53/5.69 * 17.53/5.69 * @param index index of the element to return 17.53/5.69 * @return the element at the specified position in this list 17.53/5.69 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.69 * (index < 0 || index >= size()) 17.53/5.69 */ 17.53/5.69 E get(int index); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Replaces the element at the specified position in this list with the 17.53/5.69 * specified element (optional operation). 17.53/5.69 * 17.53/5.69 * @param index index of the element to replace 17.53/5.69 * @param element element to be stored at the specified position 17.53/5.69 * @return the element previously at the specified position 17.53/5.69 * @throws UnsupportedOperationException if the set operation 17.53/5.69 * is not supported by this list 17.53/5.69 * @throws ClassCastException if the class of the specified element 17.53/5.69 * prevents it from being added to this list 17.53/5.69 * @throws NullPointerException if the specified element is null and 17.53/5.69 * this list does not permit null elements 17.53/5.69 * @throws IllegalArgumentException if some property of the specified 17.53/5.69 * element prevents it from being added to this list 17.53/5.69 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.69 * (index < 0 || index >= size()) 17.53/5.69 */ 17.53/5.69 E set(int index, E element); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Inserts the specified element at the specified position in this list 17.53/5.69 * (optional operation). Shifts the element currently at that position 17.53/5.69 * (if any) and any subsequent elements to the right (adds one to their 17.53/5.69 * indices). 17.53/5.69 * 17.53/5.69 * @param index index at which the specified element is to be inserted 17.53/5.69 * @param element element to be inserted 17.53/5.69 * @throws UnsupportedOperationException if the add operation 17.53/5.69 * is not supported by this list 17.53/5.69 * @throws ClassCastException if the class of the specified element 17.53/5.69 * prevents it from being added to this list 17.53/5.69 * @throws NullPointerException if the specified element is null and 17.53/5.69 * this list does not permit null elements 17.53/5.69 * @throws IllegalArgumentException if some property of the specified 17.53/5.69 * element prevents it from being added to this list 17.53/5.69 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.69 * (index < 0 || index > size()) 17.53/5.69 */ 17.53/5.69 void add(int index, E element); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Removes the element at the specified position in this list (optional 17.53/5.69 * operation). Shifts any subsequent elements to the left (subtracts one 17.53/5.69 * from their indices). Returns the element that was removed from the 17.53/5.69 * list. 17.53/5.69 * 17.53/5.69 * @param index the index of the element to be removed 17.53/5.69 * @return the element previously at the specified position 17.53/5.69 * @throws UnsupportedOperationException if the remove operation 17.53/5.69 * is not supported by this list 17.53/5.69 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.69 * (index < 0 || index >= size()) 17.53/5.69 */ 17.53/5.69 E remove(int index); 17.53/5.69 17.53/5.69 17.53/5.69 // Search Operations 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the index of the first occurrence of the specified element 17.53/5.69 * in this list, or -1 if this list does not contain the element. 17.53/5.69 * More formally, returns the lowest index i such that 17.53/5.69 * (o==null ? get(i)==null : o.equals(get(i))), 17.53/5.69 * or -1 if there is no such index. 17.53/5.69 * 17.53/5.69 * @param o element to search for 17.53/5.69 * @return the index of the first occurrence of the specified element in 17.53/5.69 * this list, or -1 if this list does not contain the element 17.53/5.69 * @throws ClassCastException if the type of the specified element 17.53/5.69 * is incompatible with this list (optional) 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * list does not permit null elements (optional) 17.53/5.69 */ 17.53/5.69 int indexOf(Object o); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns the index of the last occurrence of the specified element 17.53/5.69 * in this list, or -1 if this list does not contain the element. 17.53/5.69 * More formally, returns the highest index i such that 17.53/5.69 * (o==null ? get(i)==null : o.equals(get(i))), 17.53/5.69 * or -1 if there is no such index. 17.53/5.69 * 17.53/5.69 * @param o element to search for 17.53/5.69 * @return the index of the last occurrence of the specified element in 17.53/5.69 * this list, or -1 if this list does not contain the element 17.53/5.69 * @throws ClassCastException if the type of the specified element 17.53/5.69 * is incompatible with this list (optional) 17.53/5.69 * @throws NullPointerException if the specified element is null and this 17.53/5.69 * list does not permit null elements (optional) 17.53/5.69 */ 17.53/5.69 int lastIndexOf(Object o); 17.53/5.69 17.53/5.69 17.53/5.69 // List Iterators 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns a list iterator over the elements in this list (in proper 17.53/5.69 * sequence). 17.53/5.69 * 17.53/5.69 * @return a list iterator over the elements in this list (in proper 17.53/5.69 * sequence) 17.53/5.69 */ 17.53/5.69 ListIterator listIterator(); 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns a list iterator over the elements in this list (in proper 17.53/5.69 * sequence), starting at the specified position in the list. 17.53/5.69 * The specified index indicates the first element that would be 17.53/5.69 * returned by an initial call to {@link ListIterator#next next}. 17.53/5.69 * An initial call to {@link ListIterator#previous previous} would 17.53/5.69 * return the element with the specified index minus one. 17.53/5.69 * 17.53/5.69 * @param index index of the first element to be returned from the 17.53/5.69 * list iterator (by a call to {@link ListIterator#next next}) 17.53/5.69 * @return a list iterator over the elements in this list (in proper 17.53/5.69 * sequence), starting at the specified position in the list 17.53/5.69 * @throws IndexOutOfBoundsException if the index is out of range 17.53/5.69 * ({@code index < 0 || index > size()}) 17.53/5.69 */ 17.53/5.69 ListIterator listIterator(int index); 17.53/5.69 17.53/5.69 // View 17.53/5.69 17.53/5.69 /** 17.53/5.69 * Returns a view of the portion of this list between the specified 17.53/5.69 * fromIndex, inclusive, and toIndex, exclusive. (If 17.53/5.69 * fromIndex and toIndex are equal, the returned list is 17.53/5.69 * empty.) The returned list is backed by this list, so non-structural 17.53/5.69 * changes in the returned list are reflected in this list, and vice-versa. 17.53/5.69 * The returned list supports all of the optional list operations supported 17.53/5.69 * by this list.

17.53/5.69 * 17.53/5.69 * This method eliminates the need for explicit range operations (of 17.53/5.69 * the sort that commonly exist for arrays). Any operation that expects 17.53/5.69 * a list can be used as a range operation by passing a subList view 17.53/5.70 * instead of a whole list. For example, the following idiom 17.53/5.70 * removes a range of elements from a list: 17.53/5.70 *

17.53/5.70	     *      list.subList(from, to).clear();
17.53/5.70	     * 
17.53/5.70 * Similar idioms may be constructed for indexOf and 17.53/5.70 * lastIndexOf, and all of the algorithms in the 17.53/5.70 * Collections class can be applied to a subList.

17.53/5.70 * 17.53/5.70 * The semantics of the list returned by this method become undefined if 17.53/5.70 * the backing list (i.e., this list) is structurally modified in 17.53/5.70 * any way other than via the returned list. (Structural modifications are 17.53/5.70 * those that change the size of this list, or otherwise perturb it in such 17.53/5.70 * a fashion that iterations in progress may yield incorrect results.) 17.53/5.70 * 17.53/5.70 * @param fromIndex low endpoint (inclusive) of the subList 17.53/5.70 * @param toIndex high endpoint (exclusive) of the subList 17.53/5.70 * @return a view of the specified range within this list 17.53/5.70 * @throws IndexOutOfBoundsException for an illegal endpoint index value 17.53/5.70 * (fromIndex < 0 || toIndex > size || 17.53/5.70 * fromIndex > toIndex) 17.53/5.70 */ 17.53/5.70 List subList(int fromIndex, int toIndex); 17.53/5.70 } 17.53/5.70 17.53/5.70 17.53/5.70 /* 17.53/5.70 * Copyright 1994-1998 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.70 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.70 * 17.53/5.70 * This code is free software; you can redistribute it and/or modify it 17.53/5.70 * under the terms of the GNU General Public License version 2 only, as 17.53/5.70 * published by the Free Software Foundation. Sun designates this 17.53/5.70 * particular file as subject to the "Classpath" exception as provided 17.53/5.70 * by Sun in the LICENSE file that accompanied this code. 17.53/5.70 * 17.53/5.70 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.70 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.70 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.70 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.70 * accompanied this code). 17.53/5.70 * 17.53/5.70 * You should have received a copy of the GNU General Public License version 17.53/5.70 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.70 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.70 * 17.53/5.70 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.70 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.70 * have any questions. 17.53/5.70 */ 17.53/5.70 17.53/5.70 package javaUtilEx; 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Thrown by the nextElement method of an 17.53/5.70 * Enumeration to indicate that there are no more 17.53/5.70 * elements in the enumeration. 17.53/5.70 * 17.53/5.70 * @author unascribed 17.53/5.70 * @see java.util.Enumeration 17.53/5.70 * @see java.util.Enumeration#nextElement() 17.53/5.70 * @since JDK1.0 17.53/5.70 */ 17.53/5.70 public 17.53/5.70 class NoSuchElementException extends RuntimeException { 17.53/5.70 /** 17.53/5.70 * Constructs a NoSuchElementException with null 17.53/5.70 * as its error message string. 17.53/5.70 */ 17.53/5.70 public NoSuchElementException() { 17.53/5.70 super(); 17.53/5.70 } 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Constructs a NoSuchElementException, saving a reference 17.53/5.70 * to the error message string s for later retrieval by the 17.53/5.70 * getMessage method. 17.53/5.70 * 17.53/5.70 * @param s the detail message. 17.53/5.70 */ 17.53/5.70 public NoSuchElementException(String s) { 17.53/5.70 super(s); 17.53/5.70 } 17.53/5.70 } 17.53/5.70 17.53/5.70 17.53/5.70 /* 17.53/5.70 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.70 * 17.53/5.70 * This code is free software; you can redistribute it and/or modify it 17.53/5.70 * under the terms of the GNU General Public License version 2 only, as 17.53/5.70 * published by the Free Software Foundation. Sun designates this 17.53/5.70 * particular file as subject to the "Classpath" exception as provided 17.53/5.70 * by Sun in the LICENSE file that accompanied this code. 17.53/5.70 * 17.53/5.70 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.70 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.70 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.70 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.70 * accompanied this code). 17.53/5.70 * 17.53/5.70 * You should have received a copy of the GNU General Public License version 17.53/5.70 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.70 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.70 * 17.53/5.70 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.70 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.70 * have any questions. 17.53/5.70 */ 17.53/5.70 17.53/5.70 /* 17.53/5.70 * This file is available under and governed by the GNU General Public 17.53/5.70 * License version 2 only, as published by the Free Software Foundation. 17.53/5.70 * However, the following notice accompanied the original version of this 17.53/5.70 * file: 17.53/5.70 * 17.53/5.70 * Written by Doug Lea with assistance from members of JCP JSR-166 17.53/5.70 * Expert Group and released to the public domain, as explained at 17.53/5.70 * http://creativecommons.org/licenses/publicdomain 17.53/5.70 */ 17.53/5.70 17.53/5.70 package javaUtilEx; 17.53/5.70 17.53/5.70 /** 17.53/5.70 * A collection designed for holding elements prior to processing. 17.53/5.70 * Besides basic {@link java.util.Collection Collection} operations, 17.53/5.70 * queues provide additional insertion, extraction, and inspection 17.53/5.70 * operations. Each of these methods exists in two forms: one throws 17.53/5.70 * an exception if the operation fails, the other returns a special 17.53/5.70 * value (either null or false, depending on the 17.53/5.70 * operation). The latter form of the insert operation is designed 17.53/5.70 * specifically for use with capacity-restricted Queue 17.53/5.70 * implementations; in most implementations, insert operations cannot 17.53/5.70 * fail. 17.53/5.70 * 17.53/5.70 *

17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 * 17.53/5.70 *
Throws exceptionReturns special value
Insert{@link #add add(e)}{@link #offer offer(e)}
Remove{@link #remove remove()}{@link #poll poll()}
Examine{@link #element element()}{@link #peek peek()}
17.53/5.70 * 17.53/5.70 *

Queues typically, but do not necessarily, order elements in a 17.53/5.70 * FIFO (first-in-first-out) manner. Among the exceptions are 17.53/5.70 * priority queues, which order elements according to a supplied 17.53/5.70 * comparator, or the elements' natural ordering, and LIFO queues (or 17.53/5.70 * stacks) which order the elements LIFO (last-in-first-out). 17.53/5.70 * Whatever the ordering used, the head of the queue is that 17.53/5.70 * element which would be removed by a call to {@link #remove() } or 17.53/5.70 * {@link #poll()}. In a FIFO queue, all new elements are inserted at 17.53/5.70 * the tail of the queue. Other kinds of queues may use 17.53/5.70 * different placement rules. Every Queue implementation 17.53/5.70 * must specify its ordering properties. 17.53/5.70 * 17.53/5.70 *

The {@link #offer offer} method inserts an element if possible, 17.53/5.70 * otherwise returning false. This differs from the {@link 17.53/5.70 * java.util.Collection#add Collection.add} method, which can fail to 17.53/5.70 * add an element only by throwing an unchecked exception. The 17.53/5.70 * offer method is designed for use when failure is a normal, 17.53/5.70 * rather than exceptional occurrence, for example, in fixed-capacity 17.53/5.70 * (or "bounded") queues. 17.53/5.70 * 17.53/5.70 *

The {@link #remove()} and {@link #poll()} methods remove and 17.53/5.70 * return the head of the queue. 17.53/5.70 * Exactly which element is removed from the queue is a 17.53/5.70 * function of the queue's ordering policy, which differs from 17.53/5.70 * implementation to implementation. The remove() and 17.53/5.70 * poll() methods differ only in their behavior when the 17.53/5.70 * queue is empty: the remove() method throws an exception, 17.53/5.70 * while the poll() method returns null. 17.53/5.70 * 17.53/5.70 *

The {@link #element()} and {@link #peek()} methods return, but do 17.53/5.70 * not remove, the head of the queue. 17.53/5.70 * 17.53/5.70 *

The Queue interface does not define the blocking queue 17.53/5.70 * methods, which are common in concurrent programming. These methods, 17.53/5.70 * which wait for elements to appear or for space to become available, are 17.53/5.70 * defined in the {@link java.util.concurrent.BlockingQueue} interface, which 17.53/5.70 * extends this interface. 17.53/5.70 * 17.53/5.70 *

Queue implementations generally do not allow insertion 17.53/5.70 * of null elements, although some implementations, such as 17.53/5.70 * {@link LinkedList}, do not prohibit insertion of null. 17.53/5.70 * Even in the implementations that permit it, null should 17.53/5.70 * not be inserted into a Queue, as null is also 17.53/5.70 * used as a special return value by the poll method to 17.53/5.70 * indicate that the queue contains no elements. 17.53/5.70 * 17.53/5.70 *

Queue implementations generally do not define 17.53/5.70 * element-based versions of methods equals and 17.53/5.70 * hashCode but instead inherit the identity based versions 17.53/5.70 * from class Object, because element-based equality is not 17.53/5.70 * always well-defined for queues with the same elements but different 17.53/5.70 * ordering properties. 17.53/5.70 * 17.53/5.70 * 17.53/5.70 *

This interface is a member of the 17.53/5.70 * 17.53/5.70 * Java Collections Framework. 17.53/5.70 * 17.53/5.70 * @see java.util.Collection 17.53/5.70 * @see LinkedList 17.53/5.70 * @see PriorityQueue 17.53/5.70 * @see java.util.concurrent.LinkedBlockingQueue 17.53/5.70 * @see java.util.concurrent.BlockingQueue 17.53/5.70 * @see java.util.concurrent.ArrayBlockingQueue 17.53/5.70 * @see java.util.concurrent.LinkedBlockingQueue 17.53/5.70 * @see java.util.concurrent.PriorityBlockingQueue 17.53/5.70 * @since 1.5 17.53/5.70 * @author Doug Lea 17.53/5.70 * @param the type of elements held in this collection 17.53/5.70 */ 17.53/5.70 public interface Queue extends Collection { 17.53/5.70 /** 17.53/5.70 * Inserts the specified element into this queue if it is possible to do so 17.53/5.70 * immediately without violating capacity restrictions, returning 17.53/5.70 * true upon success and throwing an IllegalStateException 17.53/5.70 * if no space is currently available. 17.53/5.70 * 17.53/5.70 * @param e the element to add 17.53/5.70 * @return true (as specified by {@link Collection#add}) 17.53/5.70 * @throws IllegalStateException if the element cannot be added at this 17.53/5.70 * time due to capacity restrictions 17.53/5.70 * @throws ClassCastException if the class of the specified element 17.53/5.70 * prevents it from being added to this queue 17.53/5.70 * @throws NullPointerException if the specified element is null and 17.53/5.70 * this queue does not permit null elements 17.53/5.70 * @throws IllegalArgumentException if some property of this element 17.53/5.70 * prevents it from being added to this queue 17.53/5.70 */ 17.53/5.70 boolean add(E e); 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Inserts the specified element into this queue if it is possible to do 17.53/5.70 * so immediately without violating capacity restrictions. 17.53/5.70 * When using a capacity-restricted queue, this method is generally 17.53/5.70 * preferable to {@link #add}, which can fail to insert an element only 17.53/5.70 * by throwing an exception. 17.53/5.70 * 17.53/5.70 * @param e the element to add 17.53/5.70 * @return true if the element was added to this queue, else 17.53/5.70 * false 17.53/5.70 * @throws ClassCastException if the class of the specified element 17.53/5.70 * prevents it from being added to this queue 17.53/5.70 * @throws NullPointerException if the specified element is null and 17.53/5.70 * this queue does not permit null elements 17.53/5.70 * @throws IllegalArgumentException if some property of this element 17.53/5.70 * prevents it from being added to this queue 17.53/5.70 */ 17.53/5.70 boolean offer(E e); 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Retrieves and removes the head of this queue. This method differs 17.53/5.70 * from {@link #poll poll} only in that it throws an exception if this 17.53/5.70 * queue is empty. 17.53/5.70 * 17.53/5.70 * @return the head of this queue 17.53/5.70 * @throws NoSuchElementException if this queue is empty 17.53/5.70 */ 17.53/5.70 E remove(); 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Retrieves and removes the head of this queue, 17.53/5.70 * or returns null if this queue is empty. 17.53/5.70 * 17.53/5.70 * @return the head of this queue, or null if this queue is empty 17.53/5.70 */ 17.53/5.70 E poll(); 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Retrieves, but does not remove, the head of this queue. This method 17.53/5.70 * differs from {@link #peek peek} only in that it throws an exception 17.53/5.70 * if this queue is empty. 17.53/5.70 * 17.53/5.70 * @return the head of this queue 17.53/5.70 * @throws NoSuchElementException if this queue is empty 17.53/5.70 */ 17.53/5.70 E element(); 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Retrieves, but does not remove, the head of this queue, 17.53/5.70 * or returns null if this queue is empty. 17.53/5.70 * 17.53/5.70 * @return the head of this queue, or null if this queue is empty 17.53/5.70 */ 17.53/5.70 E peek(); 17.53/5.70 } 17.53/5.70 17.53/5.70 17.53/5.70 /* 17.53/5.70 * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.70 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.70 * 17.53/5.70 * This code is free software; you can redistribute it and/or modify it 17.53/5.70 * under the terms of the GNU General Public License version 2 only, as 17.53/5.70 * published by the Free Software Foundation. Sun designates this 17.53/5.70 * particular file as subject to the "Classpath" exception as provided 17.53/5.70 * by Sun in the LICENSE file that accompanied this code. 17.53/5.70 * 17.53/5.70 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.70 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.70 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.70 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.70 * accompanied this code). 17.53/5.70 * 17.53/5.70 * You should have received a copy of the GNU General Public License version 17.53/5.70 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.70 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.70 * 17.53/5.70 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.70 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.70 * have any questions. 17.53/5.70 */ 17.53/5.70 17.53/5.70 package javaUtilEx; 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Marker interface used by List implementations to indicate that 17.53/5.70 * they support fast (generally constant time) random access. The primary 17.53/5.70 * purpose of this interface is to allow generic algorithms to alter their 17.53/5.70 * behavior to provide good performance when applied to either random or 17.53/5.70 * sequential access lists. 17.53/5.70 * 17.53/5.70 *

The best algorithms for manipulating random access lists (such as 17.53/5.70 * ArrayList) can produce quadratic behavior when applied to 17.53/5.70 * sequential access lists (such as LinkedList). Generic list 17.53/5.70 * algorithms are encouraged to check whether the given list is an 17.53/5.70 * instanceof this interface before applying an algorithm that would 17.53/5.70 * provide poor performance if it were applied to a sequential access list, 17.53/5.70 * and to alter their behavior if necessary to guarantee acceptable 17.53/5.70 * performance. 17.53/5.70 * 17.53/5.70 *

It is recognized that the distinction between random and sequential 17.53/5.70 * access is often fuzzy. For example, some List implementations 17.53/5.70 * provide asymptotically linear access times if they get huge, but constant 17.53/5.70 * access times in practice. Such a List implementation 17.53/5.70 * should generally implement this interface. As a rule of thumb, a 17.53/5.70 * List implementation should implement this interface if, 17.53/5.70 * for typical instances of the class, this loop: 17.53/5.70 *

17.53/5.70	 *     for (int i=0, n=list.size(); i < n; i++)
17.53/5.70	 *         list.get(i);
17.53/5.70	 * 
17.53/5.70 * runs faster than this loop: 17.53/5.70 *
17.53/5.70	 *     for (Iterator i=list.iterator(); i.hasNext(); )
17.53/5.70	 *         i.next();
17.53/5.70	 * 
17.53/5.70 * 17.53/5.70 *

This interface is a member of the 17.53/5.70 * 17.53/5.70 * Java Collections Framework. 17.53/5.70 * 17.53/5.70 * @since 1.4 17.53/5.70 */ 17.53/5.70 public interface RandomAccess { 17.53/5.70 } 17.53/5.70 17.53/5.70 17.53/5.70 package javaUtilEx; 17.53/5.70 17.53/5.70 public class Random { 17.53/5.70 static String[] args; 17.53/5.70 static int index = 0; 17.53/5.70 17.53/5.70 public static int random() { 17.53/5.70 String string = args[index]; 17.53/5.70 index++; 17.53/5.70 return string.length(); 17.53/5.70 } 17.53/5.70 } 17.53/5.70 17.53/5.70 17.53/5.70 /* 17.53/5.70 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. 17.53/5.70 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.53/5.70 * 17.53/5.70 * This code is free software; you can redistribute it and/or modify it 17.53/5.70 * under the terms of the GNU General Public License version 2 only, as 17.53/5.70 * published by the Free Software Foundation. Sun designates this 17.53/5.70 * particular file as subject to the "Classpath" exception as provided 17.53/5.70 * by Sun in the LICENSE file that accompanied this code. 17.53/5.70 * 17.53/5.70 * This code is distributed in the hope that it will be useful, but WITHOUT 17.53/5.70 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17.53/5.70 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17.53/5.70 * version 2 for more details (a copy is included in the LICENSE file that 17.53/5.70 * accompanied this code). 17.53/5.70 * 17.53/5.70 * You should have received a copy of the GNU General Public License version 17.53/5.70 * 2 along with this work; if not, write to the Free Software Foundation, 17.53/5.70 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17.53/5.70 * 17.53/5.70 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 17.53/5.70 * CA 95054 USA or visit www.sun.com if you need additional information or 17.53/5.70 * have any questions. 17.53/5.70 */ 17.53/5.70 17.53/5.70 package javaUtilEx; 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Thrown to indicate that the requested operation is not supported.

17.53/5.70 * 17.53/5.70 * This class is a member of the 17.53/5.70 * 17.53/5.70 * Java Collections Framework. 17.53/5.70 * 17.53/5.70 * @author Josh Bloch 17.53/5.70 * @since 1.2 17.53/5.70 */ 17.53/5.70 public class UnsupportedOperationException extends RuntimeException { 17.53/5.70 /** 17.53/5.70 * Constructs an UnsupportedOperationException with no detail message. 17.53/5.70 */ 17.53/5.70 public UnsupportedOperationException() { 17.53/5.70 } 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Constructs an UnsupportedOperationException with the specified 17.53/5.70 * detail message. 17.53/5.70 * 17.53/5.70 * @param message the detail message 17.53/5.70 */ 17.53/5.70 public UnsupportedOperationException(String message) { 17.53/5.70 super(message); 17.53/5.70 } 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Constructs a new exception with the specified detail message and 17.53/5.70 * cause. 17.53/5.70 * 17.53/5.70 *

Note that the detail message associated with cause is 17.53/5.70 * not automatically incorporated in this exception's detail 17.53/5.70 * message. 17.53/5.70 * 17.53/5.70 * @param message the detail message (which is saved for later retrieval 17.53/5.70 * by the {@link Throwable#getMessage()} method). 17.53/5.70 * @param cause the cause (which is saved for later retrieval by the 17.53/5.70 * {@link Throwable#getCause()} method). (A null value 17.53/5.70 * is permitted, and indicates that the cause is nonexistent or 17.53/5.70 * unknown.) 17.53/5.70 * @since 1.5 17.53/5.70 */ 17.53/5.70 public UnsupportedOperationException(String message, Throwable cause) { 17.53/5.70 super(message, cause); 17.53/5.70 } 17.53/5.70 17.53/5.70 /** 17.53/5.70 * Constructs a new exception with the specified cause and a detail 17.53/5.70 * message of (cause==null ? null : cause.toString()) (which 17.53/5.70 * typically contains the class and detail message of cause). 17.53/5.70 * This constructor is useful for exceptions that are little more than 17.53/5.70 * wrappers for other throwables (for example, {@link 17.53/5.70 * java.security.PrivilegedActionException}). 17.53/5.70 * 17.53/5.70 * @param cause the cause (which is saved for later retrieval by the 17.53/5.70 * {@link Throwable#getCause()} method). (A null value is 17.53/5.70 * permitted, and indicates that the cause is nonexistent or 17.53/5.70 * unknown.) 17.53/5.70 * @since 1.5 17.53/5.70 */ 17.53/5.70 public UnsupportedOperationException(Throwable cause) { 17.53/5.70 super(cause); 17.53/5.70 } 17.53/5.70 17.53/5.70 static final long serialVersionUID = -1242599979055084673L; 17.53/5.70 } 17.53/5.70 17.53/5.70 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (3) JBCToGraph (EQUIVALENT) 17.53/5.70 Constructed TerminationGraph. 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (4) 17.53/5.70 Obligation: 17.53/5.70 Termination Graph based on JBC Program: 17.53/5.70 javaUtilEx.juLinkedListCreateRemoveLast.main([Ljava/lang/String;)V: Graph of 399 nodes with 0 SCCs. 17.53/5.70 17.53/5.70 17.53/5.70 17.53/5.70 javaUtilEx.juLinkedListCreateRemoveLast.createList(I)LjavaUtilEx/LinkedList;: Graph of 250 nodes with 1 SCC. 17.53/5.70 17.53/5.70 17.53/5.70 17.53/5.70 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (5) TerminationGraphToSCCProof (SOUND) 17.53/5.70 Splitted TerminationGraph to 1 SCCs. 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (6) 17.53/5.70 Obligation: 17.53/5.70 SCC of termination graph based on JBC Program. 17.53/5.70 SCC contains nodes from the following methods: javaUtilEx.juLinkedListCreateRemoveLast.createList(I)LjavaUtilEx/LinkedList; 17.53/5.70 SCC calls the following helper methods: 17.53/5.70 Performed SCC analyses: 17.53/5.70 *Used field analysis yielded the following read fields: 17.53/5.70 *java.lang.String: [count] 17.53/5.70 *javaUtilEx.LinkedList: [header, size] 17.53/5.70 *javaUtilEx.LinkedList$Entry: [previous, next] 17.53/5.70 *javaUtilEx.AbstractList: [modCount] 17.53/5.70 *Marker field analysis yielded the following relations that could be markers: 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (7) SCCToIRSProof (SOUND) 17.53/5.70 Transformed FIGraph SCCs to intTRSs. Log: 17.53/5.70 Generated rules. Obtained 118 IRulesP rules: 17.53/5.70 f4740_0_createList_LE(EOS(STATIC_4740(java.lang.Object(o7870sub), i1184)), i1199, i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4742_0_createList_LE(EOS(STATIC_4742(java.lang.Object(o7870sub), i1184)), i1199, i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4742_0_createList_LE(EOS(STATIC_4742(java.lang.Object(o7870sub), i1184)), i1199, i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4744_0_createList_Load(EOS(STATIC_4744(java.lang.Object(o7870sub), i1184)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: i1199 > 0 17.53/5.70 f4744_0_createList_Load(EOS(STATIC_4744(java.lang.Object(o7870sub), i1184)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4746_0_createList_New(EOS(STATIC_4746(java.lang.Object(o7870sub), i1184)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4746_0_createList_New(EOS(STATIC_4746(java.lang.Object(o7870sub), i1184)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4748_0_createList_Duplicate(EOS(STATIC_4748(java.lang.Object(o7870sub), i1184)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4748_0_createList_Duplicate(EOS(STATIC_4748(java.lang.Object(o7870sub), i1184)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4749_0_createList_InvokeMethod(EOS(STATIC_4749(java.lang.Object(o7870sub), i1184)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4749_0_createList_InvokeMethod(EOS(STATIC_4749(java.lang.Object(o7870sub), i1184)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4751_0_random_FieldAccess(EOS(STATIC_4751(java.lang.Object(o7870sub), i1184)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4751_0_random_FieldAccess(EOS(STATIC_4751(java.lang.Object(o7870sub), i1184)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4752_0_random_FieldAccess(EOS(STATIC_4752(java.lang.Object(o7870sub), i1184)), i1199, java.lang.Object(o7870sub), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4752_0_random_FieldAccess(EOS(STATIC_4752(java.lang.Object(o7870sub), i1184)), i1199, java.lang.Object(o7870sub), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4753_0_random_ArrayAccess(EOS(STATIC_4753(java.lang.Object(o7870sub), i1184)), i1199, java.lang.Object(o7870sub), i1184, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4753_0_random_ArrayAccess(EOS(STATIC_4753(java.lang.Object(ARRAY(i1210)), i1184)), i1199, java.lang.Object(ARRAY(i1210)), i1184, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4754_0_random_ArrayAccess(EOS(STATIC_4754(java.lang.Object(ARRAY(i1210)), i1184)), i1199, java.lang.Object(ARRAY(i1210)), i1184, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: i1210 >= 0 17.53/5.70 f4754_0_random_ArrayAccess(EOS(STATIC_4754(java.lang.Object(ARRAY(i1210)), i1212)), i1199, java.lang.Object(ARRAY(i1210)), i1212, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4756_0_random_ArrayAccess(EOS(STATIC_4756(java.lang.Object(ARRAY(i1210)), i1212)), i1199, java.lang.Object(ARRAY(i1210)), i1212, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4756_0_random_ArrayAccess(EOS(STATIC_4756(java.lang.Object(ARRAY(i1210)), i1212)), i1199, java.lang.Object(ARRAY(i1210)), i1212, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4758_0_random_ArrayAccess(EOS(STATIC_4758(java.lang.Object(ARRAY(i1210)), i1212)), i1199, java.lang.Object(ARRAY(i1210)), i1212, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4758_0_random_ArrayAccess(EOS(STATIC_4758(java.lang.Object(ARRAY(i1210)), i1212)), i1199, java.lang.Object(ARRAY(i1210)), i1212, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4760_0_random_Store(EOS(STATIC_4760(java.lang.Object(ARRAY(i1210)), i1212)), i1199, o7902, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: i1212 < i1210 17.53/5.70 f4760_0_random_Store(EOS(STATIC_4760(java.lang.Object(ARRAY(i1210)), i1212)), i1199, o7902, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4763_0_random_FieldAccess(EOS(STATIC_4763(java.lang.Object(ARRAY(i1210)), i1212)), i1199, o7902, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4763_0_random_FieldAccess(EOS(STATIC_4763(java.lang.Object(ARRAY(i1210)), i1212)), i1199, o7902, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4765_0_random_ConstantStackPush(EOS(STATIC_4765(java.lang.Object(ARRAY(i1210)), i1212)), i1199, o7902, i1212, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4765_0_random_ConstantStackPush(EOS(STATIC_4765(java.lang.Object(ARRAY(i1210)), i1212)), i1199, o7902, i1212, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4767_0_random_IntArithmetic(EOS(STATIC_4767(java.lang.Object(ARRAY(i1210)), i1212)), i1199, o7902, i1212, 1, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4767_0_random_IntArithmetic(EOS(STATIC_4767(java.lang.Object(ARRAY(i1210)), i1212)), i1199, o7902, i1212, matching1, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4770_0_random_FieldAccess(EOS(STATIC_4770(java.lang.Object(ARRAY(i1210)), i1212)), i1199, o7902, i1212 + 1, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: i1212 >= 0 && matching1 = 1 17.53/5.70 f4770_0_random_FieldAccess(EOS(STATIC_4770(java.lang.Object(ARRAY(i1210)), i1212)), i1199, o7902, i1213, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4772_0_random_Load(EOS(STATIC_4772(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7902, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4772_0_random_Load(EOS(STATIC_4772(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7902, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4774_0_random_InvokeMethod(EOS(STATIC_4774(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7902, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4774_0_random_InvokeMethod(EOS(STATIC_4774(java.lang.Object(ARRAY(i1210)), i1213)), i1199, java.lang.Object(o7904sub), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4777_0_random_InvokeMethod(EOS(STATIC_4777(java.lang.Object(ARRAY(i1210)), i1213)), i1199, java.lang.Object(o7904sub), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4777_0_random_InvokeMethod(EOS(STATIC_4777(java.lang.Object(ARRAY(i1210)), i1213)), i1199, java.lang.Object(o7905sub), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4780_0_random_InvokeMethod(EOS(STATIC_4780(java.lang.Object(ARRAY(i1210)), i1213)), i1199, java.lang.Object(o7905sub), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4780_0_random_InvokeMethod(EOS(STATIC_4780(java.lang.Object(ARRAY(i1210)), i1213)), i1199, java.lang.Object(o7905sub), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4783_0_length_Load(EOS(STATIC_4783(java.lang.Object(ARRAY(i1210)), i1213)), i1199, java.lang.Object(o7905sub), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4783_0_length_Load(EOS(STATIC_4783(java.lang.Object(ARRAY(i1210)), i1213)), i1199, java.lang.Object(o7905sub), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4788_0_length_FieldAccess(EOS(STATIC_4788(java.lang.Object(ARRAY(i1210)), i1213)), i1199, java.lang.Object(o7905sub), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4788_0_length_FieldAccess(EOS(STATIC_4788(java.lang.Object(ARRAY(i1210)), i1213)), i1199, java.lang.Object(java.lang.String(EOC, i1217)), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4791_0_length_FieldAccess(EOS(STATIC_4791(java.lang.Object(ARRAY(i1210)), i1213)), i1199, java.lang.Object(java.lang.String(EOC, i1217)), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4791_0_length_FieldAccess(EOS(STATIC_4791(java.lang.Object(ARRAY(i1210)), i1213)), i1199, java.lang.Object(java.lang.String(EOC, i1217)), o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4794_0_length_Return(EOS(STATIC_4794(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4794_0_length_Return(EOS(STATIC_4794(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4797_0_random_Return(EOS(STATIC_4797(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4797_0_random_Return(EOS(STATIC_4797(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4801_0_createList_InvokeMethod(EOS(STATIC_4801(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4801_0_createList_InvokeMethod(EOS(STATIC_4801(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4804_0__init__Load(EOS(STATIC_4804(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4804_0__init__Load(EOS(STATIC_4804(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4811_0__init__InvokeMethod(EOS(STATIC_4811(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4811_0__init__InvokeMethod(EOS(STATIC_4811(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4814_0__init__Load(EOS(STATIC_4814(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4814_0__init__Load(EOS(STATIC_4814(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4818_0__init__Load(EOS(STATIC_4818(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4818_0__init__Load(EOS(STATIC_4818(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4822_0__init__FieldAccess(EOS(STATIC_4822(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4822_0__init__FieldAccess(EOS(STATIC_4822(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4826_0__init__Return(EOS(STATIC_4826(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4826_0__init__Return(EOS(STATIC_4826(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4830_0_createList_InvokeMethod(EOS(STATIC_4830(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4830_0_createList_InvokeMethod(EOS(STATIC_4830(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4834_0_addLast_Load(EOS(STATIC_4834(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4834_0_addLast_Load(EOS(STATIC_4834(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4841_0_addLast_Load(EOS(STATIC_4841(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4841_0_addLast_Load(EOS(STATIC_4841(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4845_0_addLast_Load(EOS(STATIC_4845(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4845_0_addLast_Load(EOS(STATIC_4845(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4848_0_addLast_FieldAccess(EOS(STATIC_4848(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4848_0_addLast_FieldAccess(EOS(STATIC_4848(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4852_0_addLast_InvokeMethod(EOS(STATIC_4852(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4852_0_addLast_InvokeMethod(EOS(STATIC_4852(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4854_0_addBefore_New(EOS(STATIC_4854(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4854_0_addBefore_New(EOS(STATIC_4854(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4858_0_addBefore_Duplicate(EOS(STATIC_4858(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4858_0_addBefore_Duplicate(EOS(STATIC_4858(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4860_0_addBefore_Load(EOS(STATIC_4860(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4860_0_addBefore_Load(EOS(STATIC_4860(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4861_0_addBefore_Load(EOS(STATIC_4861(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4861_0_addBefore_Load(EOS(STATIC_4861(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4863_0_addBefore_Load(EOS(STATIC_4863(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4863_0_addBefore_Load(EOS(STATIC_4863(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4864_0_addBefore_FieldAccess(EOS(STATIC_4864(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4864_0_addBefore_FieldAccess(EOS(STATIC_4864(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4865_0_addBefore_FieldAccess(EOS(STATIC_4865(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: o7875[LinkedList$Entry.next]o7875 > 0 && o7875[LinkedList$Entry.next]o7873 > 0 && o7875[LinkedList$Entry.previous]o7873 > 0 && o7875[LinkedList$Entry.previous]o7875 > 0 17.53/5.70 f4865_0_addBefore_FieldAccess(EOS(STATIC_4865(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4867_0_addBefore_FieldAccess(EOS(STATIC_4867(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: o7874[LinkedList$Entry.previous]o7874 > 0 && o7874[LinkedList$Entry.previous]o7873 > 0 17.53/5.70 f4867_0_addBefore_FieldAccess(EOS(STATIC_4867(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4869_0_addBefore_FieldAccess(EOS(STATIC_4869(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: o7876[LinkedList$Entry.previous]o7873 > 0 && o7876[LinkedList$Entry.previous]o7876 > 0 17.53/5.70 f4869_0_addBefore_FieldAccess(EOS(STATIC_4869(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4871_0_addBefore_InvokeMethod(EOS(STATIC_4871(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4871_0_addBefore_InvokeMethod(EOS(STATIC_4871(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4872_0__init__Load(EOS(STATIC_4872(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4872_0__init__Load(EOS(STATIC_4872(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4873_0__init__InvokeMethod(EOS(STATIC_4873(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4873_0__init__InvokeMethod(EOS(STATIC_4873(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4874_0__init__Load(EOS(STATIC_4874(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4874_0__init__Load(EOS(STATIC_4874(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4875_0__init__Load(EOS(STATIC_4875(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4875_0__init__Load(EOS(STATIC_4875(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4876_0__init__FieldAccess(EOS(STATIC_4876(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4876_0__init__FieldAccess(EOS(STATIC_4876(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4877_0__init__Load(EOS(STATIC_4877(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4877_0__init__Load(EOS(STATIC_4877(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4878_0__init__Load(EOS(STATIC_4878(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4878_0__init__Load(EOS(STATIC_4878(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4879_0__init__FieldAccess(EOS(STATIC_4879(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4879_0__init__FieldAccess(EOS(STATIC_4879(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4880_0__init__Load(EOS(STATIC_4880(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4880_0__init__Load(EOS(STATIC_4880(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4881_0__init__Load(EOS(STATIC_4881(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4881_0__init__Load(EOS(STATIC_4881(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4882_0__init__FieldAccess(EOS(STATIC_4882(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4882_0__init__FieldAccess(EOS(STATIC_4882(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4883_0__init__Return(EOS(STATIC_4883(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4883_0__init__Return(EOS(STATIC_4883(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4884_0_addBefore_Store(EOS(STATIC_4884(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4884_0_addBefore_Store(EOS(STATIC_4884(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4885_0_addBefore_Load(EOS(STATIC_4885(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4885_0_addBefore_Load(EOS(STATIC_4885(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4886_0_addBefore_FieldAccess(EOS(STATIC_4886(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4886_0_addBefore_FieldAccess(EOS(STATIC_4886(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4887_0_addBefore_Load(EOS(STATIC_4887(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4887_0_addBefore_Load(EOS(STATIC_4887(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4888_0_addBefore_FieldAccess(EOS(STATIC_4888(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4888_0_addBefore_FieldAccess(EOS(STATIC_4888(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4889_0_addBefore_FieldAccess(EOS(STATIC_4889(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: o7875[LinkedList$Entry.next]o7875 > 0 && o7876[LinkedList$Entry.previous]o7875 > 0 && o7875[LinkedList$Entry.previous]o7875 > 0 && o7875[LinkedList$Entry.next]o7876 > 0 && o7875[LinkedList$Entry.previous]o7876 > 0 && o7876[LinkedList$Entry.previous]o7876 > 0 17.53/5.70 f4888_0_addBefore_FieldAccess(EOS(STATIC_4888(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.next]o7874, o7951[LinkedList$Entry.previous]o7874, o7951[LinkedList$Entry.previous]o7874, o7951[LinkedList$Entry.next]o7951, o7951[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.next]o7951, o7951[LinkedList$Entry.previous]o7951, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4890_0_addBefore_FieldAccess(EOS(STATIC_4890(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4889_0_addBefore_FieldAccess(EOS(STATIC_4889(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4891_0_addBefore_FieldAccess(EOS(STATIC_4891(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: o7876[LinkedList$Entry.previous]o7874 > 0 && o7874[LinkedList$Entry.previous]o7874 > 0 && o7874[LinkedList$Entry.previous]o7876 > 0 && o7876[LinkedList$Entry.previous]o7876 > 0 17.53/5.70 f4891_0_addBefore_FieldAccess(EOS(STATIC_4891(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4895_0_addBefore_Load(EOS(STATIC_4895(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4895_0_addBefore_Load(EOS(STATIC_4895(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4897_0_addBefore_FieldAccess(EOS(STATIC_4897(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4897_0_addBefore_FieldAccess(EOS(STATIC_4897(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4899_0_addBefore_Load(EOS(STATIC_4899(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4899_0_addBefore_Load(EOS(STATIC_4899(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4901_0_addBefore_FieldAccess(EOS(STATIC_4901(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4901_0_addBefore_FieldAccess(EOS(STATIC_4901(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4903_0_addBefore_Load(EOS(STATIC_4903(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4903_0_addBefore_Load(EOS(STATIC_4903(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4905_0_addBefore_Duplicate(EOS(STATIC_4905(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4905_0_addBefore_Duplicate(EOS(STATIC_4905(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4907_0_addBefore_FieldAccess(EOS(STATIC_4907(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4907_0_addBefore_FieldAccess(EOS(STATIC_4907(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4909_0_addBefore_ConstantStackPush(EOS(STATIC_4909(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4909_0_addBefore_ConstantStackPush(EOS(STATIC_4909(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4911_0_addBefore_IntArithmetic(EOS(STATIC_4911(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4911_0_addBefore_IntArithmetic(EOS(STATIC_4911(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4913_0_addBefore_FieldAccess(EOS(STATIC_4913(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4913_0_addBefore_FieldAccess(EOS(STATIC_4913(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4915_0_addBefore_Load(EOS(STATIC_4915(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4915_0_addBefore_Load(EOS(STATIC_4915(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4917_0_addBefore_Duplicate(EOS(STATIC_4917(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4917_0_addBefore_Duplicate(EOS(STATIC_4917(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4919_0_addBefore_FieldAccess(EOS(STATIC_4919(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4919_0_addBefore_FieldAccess(EOS(STATIC_4919(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4921_0_addBefore_ConstantStackPush(EOS(STATIC_4921(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4921_0_addBefore_ConstantStackPush(EOS(STATIC_4921(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4923_0_addBefore_IntArithmetic(EOS(STATIC_4923(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4923_0_addBefore_IntArithmetic(EOS(STATIC_4923(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4925_0_addBefore_FieldAccess(EOS(STATIC_4925(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4925_0_addBefore_FieldAccess(EOS(STATIC_4925(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4927_0_addBefore_Load(EOS(STATIC_4927(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4927_0_addBefore_Load(EOS(STATIC_4927(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4929_0_addBefore_Return(EOS(STATIC_4929(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4929_0_addBefore_Return(EOS(STATIC_4929(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4931_0_addLast_StackPop(EOS(STATIC_4931(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4931_0_addLast_StackPop(EOS(STATIC_4931(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4933_0_addLast_Return(EOS(STATIC_4933(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4933_0_addLast_Return(EOS(STATIC_4933(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4935_0_createList_Inc(EOS(STATIC_4935(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4935_0_createList_Inc(EOS(STATIC_4935(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4937_0_createList_JMP(EOS(STATIC_4937(java.lang.Object(ARRAY(i1210)), i1213)), i1199 + -1, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4937_0_createList_JMP(EOS(STATIC_4937(java.lang.Object(ARRAY(i1210)), i1213)), i1268, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4939_0_createList_Load(EOS(STATIC_4939(java.lang.Object(ARRAY(i1210)), i1213)), i1268, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4939_0_createList_Load(EOS(STATIC_4939(java.lang.Object(ARRAY(i1210)), i1213)), i1268, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876, o7875[LinkedList$Entry.previous]o7876) -> f4739_0_createList_Load(EOS(STATIC_4739(java.lang.Object(ARRAY(i1210)), i1213)), i1268, o7875[LinkedList$Entry.next]o7874, o7929[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7929[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7929[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7929, o7875[LinkedList$Entry.previous]o7929, o7874[LinkedList$Entry.previous]o7929, o7929[LinkedList$Entry.previous]o7929) :|: TRUE 17.53/5.70 f4739_0_createList_Load(EOS(STATIC_4739(java.lang.Object(o7870sub), i1184)), i1186, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) -> f4740_0_createList_LE(EOS(STATIC_4740(java.lang.Object(o7870sub), i1184)), i1186, i1186, o7875[LinkedList$Entry.next]o7874, o7876[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.previous]o7874, o7875[LinkedList$Entry.next]o7875, o7875[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7876[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7875, o7876[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.previous]o7873, o7875[LinkedList$Entry.previous]o7875, o7875[LinkedList$Entry.next]o7876, o7875[LinkedList$Entry.previous]o7876, o7874[LinkedList$Entry.previous]o7876, o7876[LinkedList$Entry.previous]o7876) :|: TRUE 17.53/5.70 f4890_0_addBefore_FieldAccess(EOS(STATIC_4890(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4893_0_addBefore_FieldAccess(EOS(STATIC_4893(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: o7951[LinkedList$Entry.previous]o7874 > 0 && o7874[LinkedList$Entry.previous]o7874 > 0 && o7874[LinkedList$Entry.previous]o7951 > 0 && o7951[LinkedList$Entry.previous]o7951 > 0 17.53/5.70 f4893_0_addBefore_FieldAccess(EOS(STATIC_4893(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4896_0_addBefore_Load(EOS(STATIC_4896(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4896_0_addBefore_Load(EOS(STATIC_4896(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4898_0_addBefore_FieldAccess(EOS(STATIC_4898(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4898_0_addBefore_FieldAccess(EOS(STATIC_4898(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4900_0_addBefore_Load(EOS(STATIC_4900(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4900_0_addBefore_Load(EOS(STATIC_4900(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4902_0_addBefore_FieldAccess(EOS(STATIC_4902(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4902_0_addBefore_FieldAccess(EOS(STATIC_4902(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4904_0_addBefore_Load(EOS(STATIC_4904(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4904_0_addBefore_Load(EOS(STATIC_4904(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4906_0_addBefore_Duplicate(EOS(STATIC_4906(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4906_0_addBefore_Duplicate(EOS(STATIC_4906(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4908_0_addBefore_FieldAccess(EOS(STATIC_4908(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4908_0_addBefore_FieldAccess(EOS(STATIC_4908(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4910_0_addBefore_ConstantStackPush(EOS(STATIC_4910(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4910_0_addBefore_ConstantStackPush(EOS(STATIC_4910(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4912_0_addBefore_IntArithmetic(EOS(STATIC_4912(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4912_0_addBefore_IntArithmetic(EOS(STATIC_4912(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4914_0_addBefore_FieldAccess(EOS(STATIC_4914(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4914_0_addBefore_FieldAccess(EOS(STATIC_4914(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4916_0_addBefore_Load(EOS(STATIC_4916(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4916_0_addBefore_Load(EOS(STATIC_4916(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4918_0_addBefore_Duplicate(EOS(STATIC_4918(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4918_0_addBefore_Duplicate(EOS(STATIC_4918(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4920_0_addBefore_FieldAccess(EOS(STATIC_4920(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4920_0_addBefore_FieldAccess(EOS(STATIC_4920(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4922_0_addBefore_ConstantStackPush(EOS(STATIC_4922(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4922_0_addBefore_ConstantStackPush(EOS(STATIC_4922(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4924_0_addBefore_IntArithmetic(EOS(STATIC_4924(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4924_0_addBefore_IntArithmetic(EOS(STATIC_4924(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4926_0_addBefore_FieldAccess(EOS(STATIC_4926(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4926_0_addBefore_FieldAccess(EOS(STATIC_4926(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4928_0_addBefore_Load(EOS(STATIC_4928(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4928_0_addBefore_Load(EOS(STATIC_4928(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4930_0_addBefore_Return(EOS(STATIC_4930(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4930_0_addBefore_Return(EOS(STATIC_4930(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4932_0_addLast_StackPop(EOS(STATIC_4932(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4932_0_addLast_StackPop(EOS(STATIC_4932(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4934_0_addLast_Return(EOS(STATIC_4934(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4934_0_addLast_Return(EOS(STATIC_4934(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4936_0_createList_Inc(EOS(STATIC_4936(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4936_0_createList_Inc(EOS(STATIC_4936(java.lang.Object(ARRAY(i1210)), i1213)), i1199, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4938_0_createList_JMP(EOS(STATIC_4938(java.lang.Object(ARRAY(i1210)), i1213)), i1199 + -1, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4938_0_createList_JMP(EOS(STATIC_4938(java.lang.Object(ARRAY(i1210)), i1213)), i1269, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4940_0_createList_Load(EOS(STATIC_4940(java.lang.Object(ARRAY(i1210)), i1213)), i1269, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) :|: TRUE 17.53/5.70 f4940_0_createList_Load(EOS(STATIC_4940(java.lang.Object(ARRAY(i1210)), i1213)), i1269, o7951[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7951) -> f4739_0_createList_Load(EOS(STATIC_4739(java.lang.Object(ARRAY(i1210)), i1213)), i1269, o7951[LinkedList$Entry.next]o7874, o7929[LinkedList$Entry.previous]o7874, o7951[LinkedList$Entry.previous]o7874, o7951[LinkedList$Entry.next]o7951, o7951[LinkedList$Entry.next]o7873, o7874[LinkedList$Entry.previous]o7874, o7874[LinkedList$Entry.previous]o7873, o7929[LinkedList$Entry.previous]o7873, o7874[LinkedList$Entry.previous]o7951, o7929[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.previous]o7873, o7951[LinkedList$Entry.previous]o7951, o7951[LinkedList$Entry.next]o7929, o7951[LinkedList$Entry.previous]o7929, o7874[LinkedList$Entry.previous]o7929, o7929[LinkedList$Entry.previous]o7929) :|: o7951[LinkedList$Entry.next]o7951 = 4 && o7929[LinkedList$Entry.previous]o7951 = 1 && o7951[LinkedList$Entry.next]o7929 = 1 17.53/5.70 Combined rules. Obtained 2 IRulesP rules: 17.53/5.70 f4740_0_createList_LE(EOS(STATIC_4740(java.lang.Object(ARRAY(i1210:0)), i1184:0)), i1199:0, i1199:0, o7875[LinkedList$Entry.next]o7874:0, o7876[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7876:0, o7875[LinkedList$Entry.previous]o7876:0, o7874[LinkedList$Entry.previous]o7876:0, o7876[LinkedList$Entry.previous]o7876:0) -> f4740_0_createList_LE(EOS(STATIC_4740(java.lang.Object(ARRAY(i1210:0)), i1184:0 + 1)), i1199:0 - 1, i1199:0 - 1, o7875[LinkedList$Entry.next]o7874:0, o7929[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7929[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7929[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7929:0, o7875[LinkedList$Entry.previous]o7929:0, o7874[LinkedList$Entry.previous]o7929:0, o7929[LinkedList$Entry.previous]o7929:0) :|: i1199:0 > 0 && i1210:0 > -1 && i1210:0 > i1184:0 && i1184:0 > -1 && o7875[LinkedList$Entry.next]o7873:0 > 0 && o7875[LinkedList$Entry.next]o7875:0 > 0 && o7875[LinkedList$Entry.previous]o7873:0 > 0 && o7875[LinkedList$Entry.previous]o7875:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0 > 0 && o7876[LinkedList$Entry.previous]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0 > 0 && o7875[LinkedList$Entry.next]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0 > 0 && o7875[LinkedList$Entry.previous]o7876:0 > 0 && o7874[LinkedList$Entry.previous]o7876:0 > 0 17.53/5.70 f4740_0_createList_LE(EOS(STATIC_4740(java.lang.Object(ARRAY(i1210:0)), i1184:0)), i1199:0, i1199:0, o7875[LinkedList$Entry.next]o7874:0, o7876[LinkedList$Entry.previous]o7874:0, o7876[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7875:0, o7876[LinkedList$Entry.previous]o7875:0, o7874[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7875:0) -> f4740_0_createList_LE(EOS(STATIC_4740(java.lang.Object(ARRAY(i1210:0)), i1184:0 + 1)), i1199:0 - 1, i1199:0 - 1, o7951[LinkedList$Entry.next]o7874:0, o7929[LinkedList$Entry.previous]o7874:0, o7876[LinkedList$Entry.previous]o7874:0, 4, o7951[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7929[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, 1, o7876[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7875:0, 1, o7951[LinkedList$Entry.previous]o7929:0, o7874[LinkedList$Entry.previous]o7929:0, o7929[LinkedList$Entry.previous]o7929:0) :|: i1199:0 > 0 && i1210:0 > -1 && i1210:0 > i1184:0 && i1184:0 > -1 && o7875[LinkedList$Entry.next]o7873:0 > 0 && o7875[LinkedList$Entry.next]o7875:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0 > 0 && o7874[LinkedList$Entry.previous]o7875:0 > 0 17.53/5.70 Filtered duplicate arguments: 17.53/5.70 f4740_0_createList_LE(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) -> f4740_0_createList_LE(x1, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) 17.53/5.70 Filtered unneeded arguments: 17.53/5.70 f4740_0_createList_LE(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) -> f4740_0_createList_LE(x1, x2, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) 17.53/5.70 Finished conversion. Obtained 2 rules.P rules: 17.53/5.70 f4740_0_createList_LE(i1199:0, o7876[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7876:0, o7875[LinkedList$Entry.previous]o7876:0, o7874[LinkedList$Entry.previous]o7876:0, o7876[LinkedList$Entry.previous]o7876:0, i1210:0, i1184:0) -> f4740_0_createList_LE(i1199:0 - 1, o7929[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7929[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7929[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7929:0, o7875[LinkedList$Entry.previous]o7929:0, o7874[LinkedList$Entry.previous]o7929:0, o7929[LinkedList$Entry.previous]o7929:0, i1210:0, i1184:0 + 1) :|: i1210:0 > -1 && i1199:0 > 0 && i1210:0 > i1184:0 && i1184:0 > -1 && o7875[LinkedList$Entry.next]o7873:0 > 0 && o7875[LinkedList$Entry.next]o7875:0 > 0 && o7875[LinkedList$Entry.previous]o7873:0 > 0 && o7875[LinkedList$Entry.previous]o7875:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0 > 0 && o7876[LinkedList$Entry.previous]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0 > 0 && o7875[LinkedList$Entry.next]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0 > 0 && o7874[LinkedList$Entry.previous]o7876:0 > 0 && o7875[LinkedList$Entry.previous]o7876:0 > 0 17.53/5.70 f4740_0_createList_LE(i1199:0, o7876[LinkedList$Entry.previous]o7874:0, o7876[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7875:0, o7876[LinkedList$Entry.previous]o7875:0, o7874[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7875:0, i1210:0, i1184:0) -> f4740_0_createList_LE(i1199:0 - 1, o7929[LinkedList$Entry.previous]o7874:0, o7876[LinkedList$Entry.previous]o7874:0, 4, o7951[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7929[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, 1, o7876[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7875:0, 1, o7951[LinkedList$Entry.previous]o7929:0, o7874[LinkedList$Entry.previous]o7929:0, o7929[LinkedList$Entry.previous]o7929:0, i1210:0, i1184:0 + 1) :|: i1210:0 > -1 && i1199:0 > 0 && i1210:0 > i1184:0 && i1184:0 > -1 && o7875[LinkedList$Entry.next]o7873:0 > 0 && o7875[LinkedList$Entry.next]o7875:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0 > 0 && o7874[LinkedList$Entry.previous]o7875:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0 > 0 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (8) 17.53/5.70 Obligation: 17.53/5.70 Rules: 17.53/5.70 f4740_0_createList_LE(i1199:0, o7876[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7876:0, o7875[LinkedList$Entry.previous]o7876:0, o7874[LinkedList$Entry.previous]o7876:0, o7876[LinkedList$Entry.previous]o7876:0, i1210:0, i1184:0) -> f4740_0_createList_LE(i1199:0 - 1, o7929[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7929[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7929[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7929:0, o7875[LinkedList$Entry.previous]o7929:0, o7874[LinkedList$Entry.previous]o7929:0, o7929[LinkedList$Entry.previous]o7929:0, i1210:0, i1184:0 + 1) :|: i1210:0 > -1 && i1199:0 > 0 && i1210:0 > i1184:0 && i1184:0 > -1 && o7875[LinkedList$Entry.next]o7873:0 > 0 && o7875[LinkedList$Entry.next]o7875:0 > 0 && o7875[LinkedList$Entry.previous]o7873:0 > 0 && o7875[LinkedList$Entry.previous]o7875:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0 > 0 && o7876[LinkedList$Entry.previous]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0 > 0 && o7875[LinkedList$Entry.next]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0 > 0 && o7874[LinkedList$Entry.previous]o7876:0 > 0 && o7875[LinkedList$Entry.previous]o7876:0 > 0 17.53/5.70 f4740_0_createList_LE(x, x1, x1, x2, x3, x4, x5, x6, x7, x8, x6, x8, x2, x8, x7, x8, x9, x10) -> f4740_0_createList_LE(x - 1, x11, x1, 4, x12, x4, x5, x13, x7, 1, x6, x8, 1, x14, x15, x16, x9, x10 + 1) :|: x9 > -1 && x > 0 && x9 > x10 && x10 > -1 && x3 > 0 && x2 > 0 && x6 > 0 && x8 > 0 && x5 > 0 && x4 > 0 && x7 > 0 && x1 > 0 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (9) IRSFormatTransformerProof (EQUIVALENT) 17.53/5.70 Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %). 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (10) 17.53/5.70 Obligation: 17.53/5.70 Rules: 17.53/5.70 f4740_0_createList_LE(i1199:0, o7876[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7876:0, o7875[LinkedList$Entry.previous]o7876:0, o7874[LinkedList$Entry.previous]o7876:0, o7876[LinkedList$Entry.previous]o7876:0, i1210:0, i1184:0) -> f4740_0_createList_LE(arith, o7929[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7929[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7929[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7929:0, o7875[LinkedList$Entry.previous]o7929:0, o7874[LinkedList$Entry.previous]o7929:0, o7929[LinkedList$Entry.previous]o7929:0, i1210:0, arith1) :|: i1210:0 > -1 && i1199:0 > 0 && i1210:0 > i1184:0 && i1184:0 > -1 && o7875[LinkedList$Entry.next]o7873:0 > 0 && o7875[LinkedList$Entry.next]o7875:0 > 0 && o7875[LinkedList$Entry.previous]o7873:0 > 0 && o7875[LinkedList$Entry.previous]o7875:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0 > 0 && o7876[LinkedList$Entry.previous]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0 > 0 && o7875[LinkedList$Entry.next]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0 > 0 && o7874[LinkedList$Entry.previous]o7876:0 > 0 && o7875[LinkedList$Entry.previous]o7876:0 > 0 && arith = i1199:0 - 1 && arith1 = i1184:0 + 1 17.53/5.70 f4740_0_createList_LE(x17, x18, x18, x19, x20, x21, x22, x23, x24, x25, x23, x25, x19, x25, x24, x25, x26, x27) -> f4740_0_createList_LE(x28, x29, x18, 4, x30, x21, x22, x31, x24, 1, x23, x25, 1, x32, x33, x34, x26, x35) :|: x26 > -1 && x17 > 0 && x26 > x27 && x27 > -1 && x20 > 0 && x19 > 0 && x23 > 0 && x25 > 0 && x22 > 0 && x21 > 0 && x24 > 0 && x18 > 0 && x28 = x17 - 1 && x35 = x27 + 1 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (11) IRSwTTerminationDigraphProof (EQUIVALENT) 17.53/5.70 Constructed termination digraph! 17.53/5.70 Nodes: 17.53/5.70 (1) f4740_0_createList_LE(i1199:0, o7876[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7876:0, o7875[LinkedList$Entry.previous]o7876:0, o7874[LinkedList$Entry.previous]o7876:0, o7876[LinkedList$Entry.previous]o7876:0, i1210:0, i1184:0) -> f4740_0_createList_LE(arith, o7929[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7929[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7929[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7929:0, o7875[LinkedList$Entry.previous]o7929:0, o7874[LinkedList$Entry.previous]o7929:0, o7929[LinkedList$Entry.previous]o7929:0, i1210:0, arith1) :|: i1210:0 > -1 && i1199:0 > 0 && i1210:0 > i1184:0 && i1184:0 > -1 && o7875[LinkedList$Entry.next]o7873:0 > 0 && o7875[LinkedList$Entry.next]o7875:0 > 0 && o7875[LinkedList$Entry.previous]o7873:0 > 0 && o7875[LinkedList$Entry.previous]o7875:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0 > 0 && o7876[LinkedList$Entry.previous]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0 > 0 && o7875[LinkedList$Entry.next]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0 > 0 && o7874[LinkedList$Entry.previous]o7876:0 > 0 && o7875[LinkedList$Entry.previous]o7876:0 > 0 && arith = i1199:0 - 1 && arith1 = i1184:0 + 1 17.53/5.70 (2) f4740_0_createList_LE(x17, x18, x18, x19, x20, x21, x22, x23, x24, x25, x23, x25, x19, x25, x24, x25, x26, x27) -> f4740_0_createList_LE(x28, x29, x18, 4, x30, x21, x22, x31, x24, 1, x23, x25, 1, x32, x33, x34, x26, x35) :|: x26 > -1 && x17 > 0 && x26 > x27 && x27 > -1 && x20 > 0 && x19 > 0 && x23 > 0 && x25 > 0 && x22 > 0 && x21 > 0 && x24 > 0 && x18 > 0 && x28 = x17 - 1 && x35 = x27 + 1 17.53/5.70 17.53/5.70 Arcs: 17.53/5.70 (1) -> (1), (2) 17.53/5.70 (2) -> (1) 17.53/5.70 17.53/5.70 This digraph is fully evaluated! 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (12) 17.53/5.70 Obligation: 17.53/5.70 17.53/5.70 Termination digraph: 17.53/5.70 Nodes: 17.53/5.70 (1) f4740_0_createList_LE(i1199:0, o7876[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7876[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7876[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7876:0, o7875[LinkedList$Entry.previous]o7876:0, o7874[LinkedList$Entry.previous]o7876:0, o7876[LinkedList$Entry.previous]o7876:0, i1210:0, i1184:0) -> f4740_0_createList_LE(arith, o7929[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.previous]o7874:0, o7875[LinkedList$Entry.next]o7875:0, o7875[LinkedList$Entry.next]o7873:0, o7874[LinkedList$Entry.previous]o7874:0, o7874[LinkedList$Entry.previous]o7873:0, o7929[LinkedList$Entry.previous]o7873:0, o7874[LinkedList$Entry.previous]o7875:0, o7929[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.previous]o7873:0, o7875[LinkedList$Entry.previous]o7875:0, o7875[LinkedList$Entry.next]o7929:0, o7875[LinkedList$Entry.previous]o7929:0, o7874[LinkedList$Entry.previous]o7929:0, o7929[LinkedList$Entry.previous]o7929:0, i1210:0, arith1) :|: i1210:0 > -1 && i1199:0 > 0 && i1210:0 > i1184:0 && i1184:0 > -1 && o7875[LinkedList$Entry.next]o7873:0 > 0 && o7875[LinkedList$Entry.next]o7875:0 > 0 && o7875[LinkedList$Entry.previous]o7873:0 > 0 && o7875[LinkedList$Entry.previous]o7875:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0 > 0 && o7876[LinkedList$Entry.previous]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0 > 0 && o7875[LinkedList$Entry.next]o7876:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0 > 0 && o7874[LinkedList$Entry.previous]o7876:0 > 0 && o7875[LinkedList$Entry.previous]o7876:0 > 0 && arith = i1199:0 - 1 && arith1 = i1184:0 + 1 17.53/5.70 (2) f4740_0_createList_LE(x17, x18, x18, x19, x20, x21, x22, x23, x24, x25, x23, x25, x19, x25, x24, x25, x26, x27) -> f4740_0_createList_LE(x28, x29, x18, 4, x30, x21, x22, x31, x24, 1, x23, x25, 1, x32, x33, x34, x26, x35) :|: x26 > -1 && x17 > 0 && x26 > x27 && x27 > -1 && x20 > 0 && x19 > 0 && x23 > 0 && x25 > 0 && x22 > 0 && x21 > 0 && x24 > 0 && x18 > 0 && x28 = x17 - 1 && x35 = x27 + 1 17.53/5.70 17.53/5.70 Arcs: 17.53/5.70 (1) -> (1), (2) 17.53/5.70 (2) -> (1) 17.53/5.70 17.53/5.70 This digraph is fully evaluated! 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (13) IntTRSCompressionProof (EQUIVALENT) 17.53/5.70 Compressed rules. 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (14) 17.53/5.70 Obligation: 17.53/5.70 Rules: 17.53/5.70 f4740_0_createList_LE(i1199:0:0, o7876[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.next]o7875:0:0, o7875[LinkedList$Entry.next]o7873:0:0, o7874[LinkedList$Entry.previous]o7874:0:0, o7874[LinkedList$Entry.previous]o7873:0:0, o7876[LinkedList$Entry.previous]o7873:0:0, o7874[LinkedList$Entry.previous]o7875:0:0, o7876[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.previous]o7873:0:0, o7875[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.next]o7876:0:0, o7875[LinkedList$Entry.previous]o7876:0:0, o7874[LinkedList$Entry.previous]o7876:0:0, o7876[LinkedList$Entry.previous]o7876:0:0, i1210:0:0, i1184:0:0) -> f4740_0_createList_LE(i1199:0:0 - 1, o7929[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.next]o7875:0:0, o7875[LinkedList$Entry.next]o7873:0:0, o7874[LinkedList$Entry.previous]o7874:0:0, o7874[LinkedList$Entry.previous]o7873:0:0, o7929[LinkedList$Entry.previous]o7873:0:0, o7874[LinkedList$Entry.previous]o7875:0:0, o7929[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.previous]o7873:0:0, o7875[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.next]o7929:0:0, o7875[LinkedList$Entry.previous]o7929:0:0, o7874[LinkedList$Entry.previous]o7929:0:0, o7929[LinkedList$Entry.previous]o7929:0:0, i1210:0:0, i1184:0:0 + 1) :|: o7874[LinkedList$Entry.previous]o7876:0:0 > 0 && o7875[LinkedList$Entry.previous]o7876:0:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0:0 > 0 && o7875[LinkedList$Entry.next]o7876:0:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0:0 > 0 && o7876[LinkedList$Entry.previous]o7876:0:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0:0 > 0 && o7875[LinkedList$Entry.previous]o7875:0:0 > 0 && o7875[LinkedList$Entry.previous]o7873:0:0 > 0 && o7875[LinkedList$Entry.next]o7875:0:0 > 0 && o7875[LinkedList$Entry.next]o7873:0:0 > 0 && i1184:0:0 > -1 && i1210:0:0 > i1184:0:0 && i1199:0:0 > 0 && i1210:0:0 > -1 17.53/5.70 f4740_0_createList_LE(x17:0, x18:0, x18:0, x19:0, x20:0, x21:0, x22:0, x23:0, x24:0, x25:0, x23:0, x25:0, x19:0, x25:0, x24:0, x25:0, x26:0, x27:0) -> f4740_0_createList_LE(x17:0 - 1, x29:0, x18:0, 4, x30:0, x21:0, x22:0, x31:0, x24:0, 1, x23:0, x25:0, 1, x32:0, x33:0, x34:0, x26:0, x27:0 + 1) :|: x24:0 > 0 && x18:0 > 0 && x21:0 > 0 && x22:0 > 0 && x25:0 > 0 && x23:0 > 0 && x19:0 > 0 && x20:0 > 0 && x27:0 > -1 && x27:0 < x26:0 && x17:0 > 0 && x26:0 > -1 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (15) TempFilterProof (SOUND) 17.53/5.70 Used the following sort dictionary for filtering: 17.53/5.70 f4740_0_createList_LE(INTEGER, VARIABLE, VARIABLE, VARIABLE, VARIABLE, INTEGER, INTEGER, VARIABLE, VARIABLE, VARIABLE, INTEGER, INTEGER, VARIABLE, VARIABLE, VARIABLE, VARIABLE, INTEGER, INTEGER) 17.53/5.70 Replaced non-predefined constructor symbols by 0. 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (16) 17.53/5.70 Obligation: 17.53/5.70 Rules: 17.53/5.70 f4740_0_createList_LE(i1199:0:0, o7876[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.next]o7875:0:0, o7875[LinkedList$Entry.next]o7873:0:0, o7874[LinkedList$Entry.previous]o7874:0:0, o7874[LinkedList$Entry.previous]o7873:0:0, o7876[LinkedList$Entry.previous]o7873:0:0, o7874[LinkedList$Entry.previous]o7875:0:0, o7876[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.previous]o7873:0:0, o7875[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.next]o7876:0:0, o7875[LinkedList$Entry.previous]o7876:0:0, o7874[LinkedList$Entry.previous]o7876:0:0, o7876[LinkedList$Entry.previous]o7876:0:0, i1210:0:0, i1184:0:0) -> f4740_0_createList_LE(c, o7929[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.next]o7875:0:0, o7875[LinkedList$Entry.next]o7873:0:0, o7874[LinkedList$Entry.previous]o7874:0:0, o7874[LinkedList$Entry.previous]o7873:0:0, o7929[LinkedList$Entry.previous]o7873:0:0, o7874[LinkedList$Entry.previous]o7875:0:0, o7929[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.previous]o7873:0:0, o7875[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.next]o7929:0:0, o7875[LinkedList$Entry.previous]o7929:0:0, o7874[LinkedList$Entry.previous]o7929:0:0, o7929[LinkedList$Entry.previous]o7929:0:0, i1210:0:0, c1) :|: c1 = i1184:0:0 + 1 && c = i1199:0:0 - 1 && (o7874[LinkedList$Entry.previous]o7876:0:0 > 0 && o7875[LinkedList$Entry.previous]o7876:0:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0:0 > 0 && o7875[LinkedList$Entry.next]o7876:0:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0:0 > 0 && o7876[LinkedList$Entry.previous]o7876:0:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0:0 > 0 && o7875[LinkedList$Entry.previous]o7875:0:0 > 0 && o7875[LinkedList$Entry.previous]o7873:0:0 > 0 && o7875[LinkedList$Entry.next]o7875:0:0 > 0 && o7875[LinkedList$Entry.next]o7873:0:0 > 0 && i1184:0:0 > -1 && i1210:0:0 > i1184:0:0 && i1199:0:0 > 0 && i1210:0:0 > -1) 17.53/5.70 f4740_0_createList_LE(x17:0, x18:0, x18:0, x19:0, x20:0, x21:0, x22:0, x23:0, x24:0, x25:0, x23:0, x25:0, x19:0, x25:0, x24:0, x25:0, x26:0, x27:0) -> f4740_0_createList_LE(c2, x29:0, x18:0, c3, x30:0, x21:0, x22:0, x31:0, x24:0, c4, x23:0, x25:0, c5, x32:0, x33:0, x34:0, x26:0, c6) :|: c6 = x27:0 + 1 && (c5 = 1 && (c4 = 1 && (c3 = 4 && c2 = x17:0 - 1))) && (x24:0 > 0 && x18:0 > 0 && x21:0 > 0 && x22:0 > 0 && x25:0 > 0 && x23:0 > 0 && x19:0 > 0 && x20:0 > 0 && x27:0 > -1 && x27:0 < x26:0 && x17:0 > 0 && x26:0 > -1) 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (17) PolynomialOrderProcessor (EQUIVALENT) 17.53/5.70 Found the following polynomial interpretation: 17.53/5.70 [f4740_0_createList_LE(x, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17)] = 3*x + x3 17.53/5.70 17.53/5.70 The following rules are decreasing: 17.53/5.70 f4740_0_createList_LE(i1199:0:0, o7876[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.next]o7875:0:0, o7875[LinkedList$Entry.next]o7873:0:0, o7874[LinkedList$Entry.previous]o7874:0:0, o7874[LinkedList$Entry.previous]o7873:0:0, o7876[LinkedList$Entry.previous]o7873:0:0, o7874[LinkedList$Entry.previous]o7875:0:0, o7876[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.previous]o7873:0:0, o7875[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.next]o7876:0:0, o7875[LinkedList$Entry.previous]o7876:0:0, o7874[LinkedList$Entry.previous]o7876:0:0, o7876[LinkedList$Entry.previous]o7876:0:0, i1210:0:0, i1184:0:0) -> f4740_0_createList_LE(c, o7929[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.next]o7875:0:0, o7875[LinkedList$Entry.next]o7873:0:0, o7874[LinkedList$Entry.previous]o7874:0:0, o7874[LinkedList$Entry.previous]o7873:0:0, o7929[LinkedList$Entry.previous]o7873:0:0, o7874[LinkedList$Entry.previous]o7875:0:0, o7929[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.previous]o7873:0:0, o7875[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.next]o7929:0:0, o7875[LinkedList$Entry.previous]o7929:0:0, o7874[LinkedList$Entry.previous]o7929:0:0, o7929[LinkedList$Entry.previous]o7929:0:0, i1210:0:0, c1) :|: c1 = i1184:0:0 + 1 && c = i1199:0:0 - 1 && (o7874[LinkedList$Entry.previous]o7876:0:0 > 0 && o7875[LinkedList$Entry.previous]o7876:0:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0:0 > 0 && o7875[LinkedList$Entry.next]o7876:0:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0:0 > 0 && o7876[LinkedList$Entry.previous]o7876:0:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0:0 > 0 && o7875[LinkedList$Entry.previous]o7875:0:0 > 0 && o7875[LinkedList$Entry.previous]o7873:0:0 > 0 && o7875[LinkedList$Entry.next]o7875:0:0 > 0 && o7875[LinkedList$Entry.next]o7873:0:0 > 0 && i1184:0:0 > -1 && i1210:0:0 > i1184:0:0 && i1199:0:0 > 0 && i1210:0:0 > -1) 17.53/5.70 The following rules are bounded: 17.53/5.70 f4740_0_createList_LE(i1199:0:0, o7876[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.next]o7875:0:0, o7875[LinkedList$Entry.next]o7873:0:0, o7874[LinkedList$Entry.previous]o7874:0:0, o7874[LinkedList$Entry.previous]o7873:0:0, o7876[LinkedList$Entry.previous]o7873:0:0, o7874[LinkedList$Entry.previous]o7875:0:0, o7876[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.previous]o7873:0:0, o7875[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.next]o7876:0:0, o7875[LinkedList$Entry.previous]o7876:0:0, o7874[LinkedList$Entry.previous]o7876:0:0, o7876[LinkedList$Entry.previous]o7876:0:0, i1210:0:0, i1184:0:0) -> f4740_0_createList_LE(c, o7929[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.previous]o7874:0:0, o7875[LinkedList$Entry.next]o7875:0:0, o7875[LinkedList$Entry.next]o7873:0:0, o7874[LinkedList$Entry.previous]o7874:0:0, o7874[LinkedList$Entry.previous]o7873:0:0, o7929[LinkedList$Entry.previous]o7873:0:0, o7874[LinkedList$Entry.previous]o7875:0:0, o7929[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.previous]o7873:0:0, o7875[LinkedList$Entry.previous]o7875:0:0, o7875[LinkedList$Entry.next]o7929:0:0, o7875[LinkedList$Entry.previous]o7929:0:0, o7874[LinkedList$Entry.previous]o7929:0:0, o7929[LinkedList$Entry.previous]o7929:0:0, i1210:0:0, c1) :|: c1 = i1184:0:0 + 1 && c = i1199:0:0 - 1 && (o7874[LinkedList$Entry.previous]o7876:0:0 > 0 && o7875[LinkedList$Entry.previous]o7876:0:0 > 0 && o7876[LinkedList$Entry.previous]o7874:0:0 > 0 && o7875[LinkedList$Entry.next]o7876:0:0 > 0 && o7876[LinkedList$Entry.previous]o7875:0:0 > 0 && o7876[LinkedList$Entry.previous]o7873:0:0 > 0 && o7876[LinkedList$Entry.previous]o7876:0:0 > 0 && o7874[LinkedList$Entry.previous]o7874:0:0 > 0 && o7874[LinkedList$Entry.previous]o7873:0:0 > 0 && o7875[LinkedList$Entry.previous]o7875:0:0 > 0 && o7875[LinkedList$Entry.previous]o7873:0:0 > 0 && o7875[LinkedList$Entry.next]o7875:0:0 > 0 && o7875[LinkedList$Entry.next]o7873:0:0 > 0 && i1184:0:0 > -1 && i1210:0:0 > i1184:0:0 && i1199:0:0 > 0 && i1210:0:0 > -1) 17.53/5.70 f4740_0_createList_LE(x17:0, x18:0, x18:0, x19:0, x20:0, x21:0, x22:0, x23:0, x24:0, x25:0, x23:0, x25:0, x19:0, x25:0, x24:0, x25:0, x26:0, x27:0) -> f4740_0_createList_LE(c2, x29:0, x18:0, c3, x30:0, x21:0, x22:0, x31:0, x24:0, c4, x23:0, x25:0, c5, x32:0, x33:0, x34:0, x26:0, c6) :|: c6 = x27:0 + 1 && (c5 = 1 && (c4 = 1 && (c3 = 4 && c2 = x17:0 - 1))) && (x24:0 > 0 && x18:0 > 0 && x21:0 > 0 && x22:0 > 0 && x25:0 > 0 && x23:0 > 0 && x19:0 > 0 && x20:0 > 0 && x27:0 > -1 && x27:0 < x26:0 && x17:0 > 0 && x26:0 > -1) 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (18) 17.53/5.70 Obligation: 17.53/5.70 Rules: 17.53/5.70 f4740_0_createList_LE(x17:0, x18:0, x18:0, x19:0, x20:0, x21:0, x22:0, x23:0, x24:0, x25:0, x23:0, x25:0, x19:0, x25:0, x24:0, x25:0, x26:0, x27:0) -> f4740_0_createList_LE(c2, x29:0, x18:0, c3, x30:0, x21:0, x22:0, x31:0, x24:0, c4, x23:0, x25:0, c5, x32:0, x33:0, x34:0, x26:0, c6) :|: c6 = x27:0 + 1 && (c5 = 1 && (c4 = 1 && (c3 = 4 && c2 = x17:0 - 1))) && (x24:0 > 0 && x18:0 > 0 && x21:0 > 0 && x22:0 > 0 && x25:0 > 0 && x23:0 > 0 && x19:0 > 0 && x20:0 > 0 && x27:0 > -1 && x27:0 < x26:0 && x17:0 > 0 && x26:0 > -1) 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (19) PolynomialOrderProcessor (EQUIVALENT) 17.53/5.70 Found the following polynomial interpretation: 17.53/5.70 [f4740_0_createList_LE(x, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17)] = x16 - x17 17.53/5.70 17.53/5.70 The following rules are decreasing: 17.53/5.70 f4740_0_createList_LE(x17:0, x18:0, x18:0, x19:0, x20:0, x21:0, x22:0, x23:0, x24:0, x25:0, x23:0, x25:0, x19:0, x25:0, x24:0, x25:0, x26:0, x27:0) -> f4740_0_createList_LE(c2, x29:0, x18:0, c3, x30:0, x21:0, x22:0, x31:0, x24:0, c4, x23:0, x25:0, c5, x32:0, x33:0, x34:0, x26:0, c6) :|: c6 = x27:0 + 1 && (c5 = 1 && (c4 = 1 && (c3 = 4 && c2 = x17:0 - 1))) && (x24:0 > 0 && x18:0 > 0 && x21:0 > 0 && x22:0 > 0 && x25:0 > 0 && x23:0 > 0 && x19:0 > 0 && x20:0 > 0 && x27:0 > -1 && x27:0 < x26:0 && x17:0 > 0 && x26:0 > -1) 17.53/5.70 The following rules are bounded: 17.53/5.70 f4740_0_createList_LE(x17:0, x18:0, x18:0, x19:0, x20:0, x21:0, x22:0, x23:0, x24:0, x25:0, x23:0, x25:0, x19:0, x25:0, x24:0, x25:0, x26:0, x27:0) -> f4740_0_createList_LE(c2, x29:0, x18:0, c3, x30:0, x21:0, x22:0, x31:0, x24:0, c4, x23:0, x25:0, c5, x32:0, x33:0, x34:0, x26:0, c6) :|: c6 = x27:0 + 1 && (c5 = 1 && (c4 = 1 && (c3 = 4 && c2 = x17:0 - 1))) && (x24:0 > 0 && x18:0 > 0 && x21:0 > 0 && x22:0 > 0 && x25:0 > 0 && x23:0 > 0 && x19:0 > 0 && x20:0 > 0 && x27:0 > -1 && x27:0 < x26:0 && x17:0 > 0 && x26:0 > -1) 17.53/5.70 17.53/5.70 ---------------------------------------- 17.53/5.70 17.53/5.70 (20) 17.53/5.70 YES 17.65/6.60 EOF