Lines Matching defs:object

67         LinkIterator(LinkedList<ET> object, int location) {
68 list = object;
89 public void add(ET object) {
92 Link<ET> newLink = new Link<ET>(object, link, next);
171 public void set(ET object) {
174 lastLink.data = object;
208 * Inserts the specified object into this {@code LinkedList} at the
209 * specified location. The object is inserted before any previous element at
211 * {@code LinkedList}, the object is added at the end.
215 * @param object
216 * the object to add.
221 public void add(int location, E object) {
234 Link<E> newLink = new Link<E>(object, previous, link);
245 * Adds the specified object at the end of this {@code LinkedList}.
247 * @param object
248 * the object to add.
252 public boolean add(E object) {
255 Link<E> newLink = new Link<E>(object, oldLast, voidLink);
275 * if the class of an object is inappropriate for this list.
277 * if an object cannot be added to this list.
347 * Adds the specified object at the beginning of this {@code LinkedList}.
349 * @param object
350 * the object to add.
352 public void addFirst(E object) {
354 Link<E> newLink = new Link<E>(object, voidLink, oldFirst);
362 * Adds the specified object at the end of this {@code LinkedList}.
364 * @param object
365 * the object to add.
367 public void addLast(E object) {
369 Link<E> newLink = new Link<E>(object, oldLast, voidLink);
416 * Searches this {@code LinkedList} for the specified object.
418 * @param object
419 * the object to search for.
420 * @return {@code true} if {@code object} is an element of this
424 public boolean contains(Object object) {
426 if (object != null) {
428 if (object.equals(link.data)) {
493 public int indexOf(Object object) {
496 if (object != null) {
498 if (object.equals(link.data)) {
517 * Searches this {@code LinkedList} for the specified object and returns the
520 * @param object
521 * the object to search for
522 * @return the index of the last occurrence of the object, or -1 if it was
526 public int lastIndexOf(Object object) {
529 if (object != null) {
532 if (object.equals(link.data)) {
567 * Removes the object at the specified location from this {@code LinkedList}.
570 * the index of the object to remove
571 * @return the removed object
600 public boolean remove(Object object) {
602 if (object != null) {
603 while (link != voidLink && !object.equals(link.data)) {
624 * Removes the first object from this {@code LinkedList}.
626 * @return the removed object.
644 * Removes the last object from this {@code LinkedList}.
646 * @return the removed object.
665 * with the specified object.
668 * the index at which to put the specified object.
669 * @param object
670 * the object to add.
673 * if the class of an object is inappropriate for this list.
675 * if an object cannot be added to this list.
680 public E set(int location, E object) {
693 link.data = object;