Demos and Usage of java.util.List.isEmpty()


   1:   };
   2:   static List a = Arrays.toList(s);
   3:         ...
   4:   static List a2 = Arrays.toList(
   5:     new String[] { s[3], s[4], s[5] });
   6:         ...
   7:       a.containsAll(a2));
   8:     System.out.println("a.isEmpty() = " +
   9:         ...
  10:       a.isEmpty());

View Full Code Here
   1:     
   2:     private List runnables = new ArrayList();
   3: 
   4:         ...
   5:     public boolean isEmpty() {
   6:         return runnables.isEmpty();
   7:     }
   8: 
   9:     public boolean remove(IRunnableWithProgress runnable) {

View Full Code Here
   1: import java.util.Iterator;
   2: import java.util.List;
   3: 
   4:         ...
   5:     private static final long serialVersionUID = 999535944385968291L;
   6:     private List list = new ArrayList();
   7: 
   8:         ...
   9:     public boolean isEmpty() {
  10:         return list.isEmpty();
  11:     }

View Full Code Here
   1: 
   2:     protected List events;
   3: 
   4:         ...
   5:     {
   6:         List tmp = SCollection.createArrayList();
   7:         for(int i=0; i<events.size(); i++)
   8:         ...
   9:     {
  10:         return events.isEmpty();
  11:     }

View Full Code Here
   1: 
   2: public abstract class RefreshableList implements Refreshable, List {
   3: 
   4:         ...
   5:     public boolean isEmpty() {
   6:         return backingList.isEmpty();
   7:     }
   8:         ...
   9:     }
  10:     public List subList(int arg0, int arg1) {
  11:         return backingList.subList(arg0, arg1);
  12:         ...
  13:     }
  14:     protected List backingList;

View Full Code Here
   1: {
   2:     private List classPathEntries = new ArrayList();
   3: 
   4:         ...
   5:     {
   6:         return classPathEntries.isEmpty();
   7:     }
   8: 
   9:     public int size()

View Full Code Here
   1: import java.util.ArrayList;
   2: import java.util.List;
   3: 
   4:         ...
   5: 
   6:     private List fHistory;
   7:     private JavaEditor fEditor;
   8:         ...
   9:     public boolean isEmpty() {
  10:         return fHistory.isEmpty();
  11:     }
  12:         ...
  13:     public void flush() {
  14:         if (fHistory.isEmpty())

View Full Code Here
   1: import java.util.Iterator;
   2: import java.util.List;
   3: 
   4:         ...
   5:     
   6:     private List _rules = new ArrayList();
   7:     private String _name;
   8:         ...
   9:         public boolean isIdentity() {
  10:             return _rules.isEmpty();
  11:         }
  12:         ...
  13:         public boolean isIdentity() {
  14:             return _rules.isEmpty();

View Full Code Here
   1: 
   2: import java.util.List;
   3: import java.util.LinkedList;
   4:         ...
   5:     public static final ELContext getCurrent() {
   6:         final List jcs = (List)_elCtxs.get();
   7:         ...
   8:         return jcs != null && !jcs.isEmpty() ? (ELContext)jcs.get(0): null;
   9:     }

View Full Code Here
   1: import java.util.LinkedList;
   2: import java.util.List;
   3: 
   4:         ...
   5:     
   6:     protected List events = new LinkedList();
   7:     
   8:         ...
   9:     public boolean hasEvents() {
  10:         return !events.isEmpty();
  11:     }
  12:         ...
  13:     protected Object getLastEvent() {
  14:         return events.isEmpty()

View Full Code Here
   1: import java.util.Iterator;
   2: import java.util.List;
   3: import java.util.ListIterator;
   4:         ...
   5: {
   6:   private List cdeList = new ArrayList();
   7:   private boolean detailCDEList=false;
   8:         ...
   9:   {
  10:     return cdeList.isEmpty();
  11:   }
  12:         ...
  13:     {
  14:       List tempList = new ArrayList();

View Full Code Here
   1: import java.util.ArrayList;
   2: import java.util.List;
   3: 
   4:         ...
   5: public class TestingConsumer implements MessageListener {
   6:     private List messages = new ArrayList();
   7:     private Object semaphore;
   8:         ...
   9: 
  10:     public synchronized List flushMessages() {
  11:         List answer = new ArrayList(messages);
  12:         ...
  13:     protected boolean hasReceivedMessage() {
  14:         return messages.isEmpty();

View Full Code Here
   1: import java.util.ArrayList;
   2: import java.util.List;
   3: 
   4:         ...
   5: public class AgentMessageListener implements MessageListener {
   6:     private List messages = new CopyOnWriteArrayList();
   7:     private Object semaphore = new Object();;
   8:         ...
   9: 
  10:     public List flushMessages() {
  11:         List answer = new ArrayList(messages);
  12:         ...
  13:     protected boolean hasReceivedMessage() {
  14:         return messages.isEmpty();

View Full Code Here
   1: import java.util.ArrayList;
   2: import java.util.List;
   3: 
   4:         ...
   5: public class AgentMessageListener implements MessageListener {
   6:     private List messages = new CopyOnWriteArrayList();
   7:     private Object semaphore = new Object();;
   8:         ...
   9: 
  10:     public List flushMessages() {
  11:         List answer = new ArrayList(messages);
  12:         ...
  13:     protected boolean hasReceivedMessage() {
  14:         return messages.isEmpty();

View Full Code Here
   1: 
   2: public class QueryList implements List {
   3:         ...
   4:   private List list;
   5: 
   6:         ...
   7:   public boolean isEmpty() {
   8:     return list.isEmpty();
   9:   }

View Full Code Here