001: /*
002: * Copyright 2007 Google Inc.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
005: * use this file except in compliance with the License. You may obtain a copy of
006: * the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
012: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
013: * License for the specific language governing permissions and limitations under
014: * the License.
015: */
016: package java.util;
017:
018: import java.io.Serializable;
019:
020: /**
021: * Linked list implementation. <a
022: * href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/LinkedList.html">[Sun
023: * docs]</a>
024: *
025: * @param <E> element type.
026: */
027: public class LinkedList<E> extends AbstractSequentialList<E> implements
028: List<E>, Queue<E>, Cloneable, Serializable {
029:
030: public LinkedList() {
031: // TODO(jat): implement
032: throw new UnsupportedOperationException(
033: "LinkedList unsupported");
034: }
035:
036: public LinkedList(Collection<? extends E> c) {
037: this ();
038: addAll(c);
039: }
040:
041: @Override
042: public boolean add(E o) {
043: // TODO(jat): implement
044: return false;
045: }
046:
047: @Override
048: public boolean addAll(Collection<? extends E> c) {
049: // TODO(jat): implement
050: return false;
051: }
052:
053: public void addFirst(E o) {
054: // TODO(jat): implement
055: }
056:
057: public void addLast(E o) {
058: // TODO(jat): implement
059: }
060:
061: @Override
062: public void clear() {
063: // TODO(jat): implement
064: }
065:
066: public Object clone() {
067: // TODO(jat): implement
068: return null;
069: }
070:
071: @Override
072: public boolean contains(Object o) {
073: // TODO(jat): implement
074: return false;
075: }
076:
077: public E element() {
078: return getFirst();
079: }
080:
081: public E getFirst() {
082: // TODO(jat): implement
083: return null;
084: }
085:
086: public E getLast() {
087: // TODO(jat): implement
088: return null;
089: }
090:
091: @Override
092: public int indexOf(Object o) {
093: // TODO(jat): implement
094: return 0;
095: }
096:
097: @Override
098: public int lastIndexOf(Object o) {
099: // TODO(jat): implement
100: return 0;
101: }
102:
103: @Override
104: public ListIterator<E> listIterator(int index) {
105: // TODO(jat): implement
106: return null;
107: }
108:
109: public boolean offer(E o) {
110: return add(o);
111: }
112:
113: public E peek() {
114: if (size() == 0) {
115: return null;
116: } else {
117: return getFirst();
118: }
119: }
120:
121: public E poll() {
122: if (size() == 0) {
123: return null;
124: } else {
125: return removeFirst();
126: }
127: }
128:
129: public E remove() {
130: return removeFirst();
131: }
132:
133: public E removeFirst() {
134: // TODO(jat): implement
135: return null;
136: }
137:
138: public E removeLast() {
139: // TODO(jat): implement
140: return null;
141: }
142:
143: @Override
144: public int size() {
145: // TODO(jat): implement
146: return 0;
147: }
148:
149: @Override
150: public List<E> subList(int fromIndex, int toIndex) {
151: // TODO Auto-generated method stub
152: return null;
153: }
154:
155: @Override
156: public Object[] toArray() {
157: // TODO(jat): implement
158: return null;
159: }
160:
161: @Override
162: public <T> T[] toArray(T[] a) {
163: // TODO(jat): implement
164: return null;
165: }
166:
167: }
|