1 24 25 package com.mckoi.util; 26 27 38 39 public abstract class IntegerListBlockInterface { 40 41 44 public IntegerListBlockInterface next; 45 46 49 public IntegerListBlockInterface previous; 50 51 55 boolean has_changed; 56 57 58 63 public final boolean hasChanged() { 64 return has_changed; 65 } 66 67 70 public abstract int size(); 71 72 75 public abstract boolean isFull(); 76 77 80 public abstract boolean isEmpty(); 81 82 86 public abstract boolean canContain(int number); 87 88 91 public abstract int topInt(); 92 93 96 public abstract int bottomInt(); 97 98 101 public abstract int intAt(int pos); 102 103 106 public abstract void addInt(int val); 107 108 111 public abstract int removeIntAt(int pos); 112 113 116 public abstract void insertIntAt(int val, int pos); 117 118 123 public abstract int setIntAt(int val, int pos); 124 125 131 public abstract void moveTo(IntegerListBlockInterface dest_block, 132 int dest_index, int length); 133 134 138 public abstract void copyTo(IntegerListBlockInterface dest_block); 139 140 144 public abstract int copyTo(int[] to, int offset); 145 146 149 public abstract void clear(); 150 151 156 public abstract int iterativeSearch(int val); 157 158 164 public abstract int iterativeSearch(int val, int position); 165 166 167 168 170 174 public abstract int binarySearch(Object key, IndexComparator c); 175 176 181 public abstract int searchFirst(Object key, IndexComparator c); 182 183 188 public abstract int searchLast(Object key, IndexComparator c); 189 190 194 public abstract int searchFirst(int val); 195 196 200 public abstract int searchLast(int val); 201 202 } 203 | Popular Tags |