• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2012 AndroidPlot.com
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 
17 package com.androidplot.util;
18 
19 import java.util.LinkedList;
20 import java.util.List;
21 
22 public class ZLinkedList<Type> extends LinkedList<Type> implements ZIndexable<Type> {
23 
24     //private LinkedList<Type> list;
25     private ListOrganizer<Type> organizer;
26 
27     {
28         //list = new LinkedList<Type>();
29         organizer = new ListOrganizer<Type>(this);
30     }
31 
32 
33     @Override
moveToTop(Type element)34     public boolean moveToTop(Type element) {
35         return organizer.moveToTop(element);
36     }
37 
38     @Override
moveAbove(Type objectToMove, Type reference)39     public boolean moveAbove(Type objectToMove, Type reference) {
40         return organizer.moveAbove(objectToMove, reference);
41     }
42 
43     @Override
moveBeneath(Type objectToMove, Type reference)44     public boolean moveBeneath(Type objectToMove, Type reference) {
45         return organizer.moveBeneath(objectToMove, reference);
46     }
47 
48     @Override
moveToBottom(Type key)49     public boolean moveToBottom(Type key) {
50         return organizer.moveToBottom(key);
51     }
52 
53     @Override
moveUp(Type key)54     public boolean moveUp(Type key) {
55         return organizer.moveUp(key);
56     }
57 
58     @Override
moveDown(Type key)59     public boolean moveDown(Type key) {
60         return organizer.moveDown(key);
61     }
62 
63     @Override
elements()64     public List<Type> elements() {
65         return organizer.elements();
66     }
67 
addToBottom(Type element)68     public void addToBottom(Type element) {
69         organizer.addToBottom(element);
70     }
71 
addToTop(Type element)72     public void addToTop(Type element) {
73         organizer.addToTop(element);
74     }
75 
76 
77 
78 }
79