Demos and Usage of java.util.LinkedList.removeLast()


   1: package de.uniwue.ki.mas.sim.analysis;
   2: import java.util.LinkedList;
   3: public final class BoundedStack {
   4:         ...
   5:     private final int _windowSize;
   6:     private final LinkedList _array;
   7: 
   8:         ...
   9: public BoundedStack(int windowSize) {
  10:     this(new LinkedList(), windowSize);
  11: }
  12:         ...
  13:     if ((_windowSize > 0) && (size() > _windowSize)) {
  14:         _array.removeLast();

View Full Code Here
   1: import java.util.Iterator;
   2: import java.util.LinkedList;
   3: 
   4:         ...
   5: 
   6:     LinkedList list = new LinkedList();
   7:     
   8:         ...
   9:         
  10:         return list.removeLast();
  11:     }

View Full Code Here
   1: import java.util.HashMap;
   2: import java.util.LinkedList;
   3: 
   4:         ...
   5:     
   6:     private LinkedList m_list = new LinkedList();
   7:     private HashMap    m_map  = new HashMap();
   8:         ...
   9:     public Object removeLast() {
  10:         return m_list.removeLast();
  11:     }

View Full Code Here
   1: 
   2: import java.util.LinkedList;
   3: import java.util.List;
   4:         ...
   5: public class WeblogQueue {
   6:   private LinkedList queue;
   7:   private int size;
   8:         ...
   9:     this.size = size;
  10:     queue = new LinkedList();
  11:   }
  12:         ...
  13:     if (queue.size() == size) {
  14:       queue.removeLast();

View Full Code Here
   1: import java.util.EmptyStackException;
   2: import java.util.LinkedList;
   3: 
   4:         ...
   5: {
   6:     private final LinkedList elements = new LinkedList();
   7: 
   8:         ...
   9: 
  10:         return elements.removeLast();
  11:     }

View Full Code Here
   1: 
   2: import java.util.LinkedList;
   3: 
   4:         ...
   5:     private static final int CAPACITY = 50;
   6:     private LinkedList queue;
   7:     private int cursor = -1;
   8:         ...
   9:     public ReusableHelpPartHistory() {
  10:         queue = new LinkedList();
  11:     }
  12:         ...
  13:                 for (int i=extra; i>0; i--) {
  14:                     queue.removeLast();

View Full Code Here
   1: 
   2: import java.util.LinkedList;
   3: 
   4:         ...
   5:     ListedHashTree newTree;
   6:     LinkedList objects = new LinkedList();
   7: 
   8:         ...
   9:     {
  10:         objects.removeLast();
  11:     }

View Full Code Here
   1: import java.util.Iterator;
   2: import java.util.LinkedList;
   3: import java.util.List;
   4:         ...
   5: public class Queue {
   6:   private LinkedList queue;
   7:   private int size;
   8:         ...
   9:     this.size = size;
  10:     queue = new LinkedList();
  11:   }
  12:         ...
  13:     if (queue.size() == size) {
  14:       queue.removeLast();

View Full Code Here
   1: import java.util.HashMap;
   2: import java.util.LinkedList;
   3: import java.util.Map;
   4:         ...
   5:     public Object get() {
   6:         LinkedList list = listThreadLocal.getList();
   7:         if (list.isEmpty()) {
   8:         ...
   9:     public Object pop() {
  10:         LinkedList list = listThreadLocal.getList();
  11:         if (list.isEmpty()) {
  12:         ...
  13:         }
  14:         return list.removeLast();

View Full Code Here
   1: 
   2: import java.util.LinkedList;
   3: 
   4:         ...
   5:     private Connection connection;
   6:     private LinkedList sessions = new LinkedList();
   7: 
   8:         ...
   9:             else {
  10:                 answer = (Session) sessions.removeLast();
  11:             }

View Full Code Here
   1: import java.util.Iterator;
   2: import java.util.LinkedList;
   3: 
   4:         ...
   5: 
   6:     private final LinkedList samples;
   7:     private final long unit;
   8:         ...
   9: 
  10:         samples = new LinkedList();
  11:         baseTime = System.currentTimeMillis();
  12:         ...
  13:         {
  14:             samples.removeLast();

View Full Code Here
   1: import java.util.Iterator;
   2: import java.util.LinkedList;
   3: import java.util.List;
   4:         ...
   5:     
   6:     private final LinkedList events = new LinkedList();
   7:     
   8:         ...
   9:             while (events.size() > maxHistory) {
  10:                 events.removeLast();
  11:             }

View Full Code Here
   1: 
   2: import java.util.LinkedList;
   3: 
   4:         ...
   5:         if (settings != null) {
   6:             final LinkedList locations= new LinkedList();
   7:             final String[] items= fCombo.getItems();
   8:         ...
   9:             for (int index= 0; index < size - MAX_HISTORY_SIZE; index++)
  10:                 locations.removeLast();
  11:             settings.put(fKey, (String[]) locations.toArray(new String[locations.size()]));

View Full Code Here
   1: 
   2: import java.util.LinkedList;
   3: 
   4:         ...
   5:         if (settings != null) {
   6:             final LinkedList locations= new LinkedList();
   7:             final String[] items= fCombo.getItems();
   8:         ...
   9:             for (int index= 0; index < size - MAX_HISTORY_SIZE; index++)
  10:                 locations.removeLast();
  11:             settings.put(fKey, (String[]) locations.toArray(new String[locations.size()]));

View Full Code Here
   1: import java.util.Iterator;
   2: import java.util.LinkedList;
   3: import java.util.ListIterator;
   4:         ...
   5:     
   6:         LinkedList fileList = null;
   7:         JMenu fileMenu = null;
   8:         ...
   9:     {
  10:         fileList = new LinkedList();
  11:         readFile = iniFile;
  12:         ...
  13:             {
  14:                 fileList.removeLast();

View Full Code Here