APISonar


java.util.ArrayList.isEmpty

> java > util > ArrayList > isEmpty
java APIs util APIs ArrayList APIs isEmpty APIs

Example 1
private final ArrayList<MoveInfo> mPendingMoves = new ArrayList<>();

    public boolean isRunning() {
        return (!mPendingAdditions.isEmpty() ||
                !mPendingChanges.isEmpty() ||
                !mPendingMoves.isEmpty() ||
                !mPendingRemovals.isEmpty() ||
                !mMoveAnimations.isEmpty() ||
                !mRemoveAnimations.isEmpty() ||
                !mAddAnimations.isEmpty() ||
                !mChangeAnimations.isEmpty() ||
                !mMovesList.isEmpty() ||
                !mAdditionsList.isEmpty() ||
                !mChangesList.isEmpty());
    }
Example 2
protected ArrayList list = null;

    public boolean isEmpty() {

        if (fast) {
            return (list.isEmpty());
        } else {
            synchronized (list) {
                return (list.isEmpty());
            }
        }

    }
Example 3
private final ArrayList<T> _list;

  public boolean isEmpty()
  {
    return _list.isEmpty();
  }
Example 4
private final ArrayList<Object[]> indicateIStream = new ArrayList<Object[]>();

    public void assertNoneReceived() {
        assertTrue(indicateStart.isEmpty());
        assertTrue(indicateIStream.isEmpty());
        assertTrue(indicateRStream.isEmpty());
        assertTrue(indicateEnd.isEmpty());
    }
Example 5
private final ArrayList<Entry> _entries = new ArrayList<>();

    public boolean isEmpty()
    {
        return _entries.isEmpty();
    }
Example 6
private ArrayList myArrayList;

	public boolean isEmpty() {
		// TODO Auto-generated method stub
		return myArrayList.isEmpty();
	}
Example 7
public boolean isEmpty()
   {
      ArrayList<T> stack = getStack(false);
      return stack == null || stack.isEmpty();
   }
Example 8
private ArrayList<View> mChildrenToRemoveAnimated = new ArrayList<>();

    public boolean isAddOrRemoveAnimationPending() {
        return mNeedsAnimation
                && (!mChildrenToAddAnimated.isEmpty() || !mChildrenToRemoveAnimated.isEmpty());
    }
Example 9
private ArrayList<Query> mShuffledQueries;

    public Query getFirstQuery() {
        if (mShuffled ? mShuffledQueries.isEmpty() : mQueries.isEmpty()) {
            return null;
        }

        return mShuffled ? mShuffledQueries.get(0) : mQueries.get(0);
    }
Example 10
private final ArrayList<Port> mPorts = new ArrayList<>();

  public boolean hasOpenPortsWithService(){
    synchronized (mPorts) {
      if (!mPorts.isEmpty()) {
        for (Port p : mPorts) {
          if (p.service != null && !p.service.isEmpty())
            return true;
        }
      }
    }

    return false;
  }
Example 11
private ArrayList<MqttPublish> messageQueue;

	boolean areQueuesEmpty() {
		synchronized (workAvailable) {
			return completeQueue.isEmpty() && messageQueue.isEmpty();
		}
	}
Example 12
protected ArrayList<EventBean> lastBatch = null;

    public boolean isEmpty() {
        if (lastBatch != null) {
            if (!lastBatch.isEmpty()) {
                return false;
            }
        }
        return currentBatch.isEmpty();
    }
Example 13
private ArrayList convertedMethodDescs = new ArrayList();

    public ArrayList getConvertedMethodDescs() {
       if (convertedMethodDescs.isEmpty()) {
           convertStylePrefetchDisabledMethods();
       } 
       return convertedMethodDescs;
    }
Example 14
private ArrayList<Uri> mImageUris;

    public void onFinish() {
        boolean isEmpty = TextUtils.isEmpty(mTextEdit.getText()) && mImageUris.isEmpty()
                && mLinkInfo == null;
        if (mChanged && !isEmpty) {
            ConfirmDiscardContentDialogFragment.show(this);
        } else {
            finish();
        }
    }
Example 15
private final ArrayList<SearchResult> resultCache_ = 
                                             new ArrayList<SearchResult>();

   public boolean hasCachedResults()
   {
      return !resultCache_.isEmpty();
   }
Example 16
private ArrayList<Element> elements;

	public Element getFirstElement() {
		if (!elements.isEmpty()) {
			return elements.get(0);
		}
		return null;
	}
Example 17
private ArrayList<H> mPendingRemovals = new ArrayList<>();

    public void runPendingAnimations() {
        boolean removalsPending = !mPendingRemovals.isEmpty();
        boolean movesPending = !mPendingMoves.isEmpty();
        boolean additionsPending = !mPendingAdditions.isEmpty();
        if (!removalsPending && !movesPending && !additionsPending) {
            // nothing to animate
            return;
        }
        // First, remove stuff
        runRemoveAnimation();
        // Next, move stuff
        runMoveAnimation(removalsPending, movesPending);
        // Next, add stuff
        runAddAnimation(removalsPending, movesPending, additionsPending);
    }
Example 18
private ArrayList<MenuItem> mLeftMenuItems;

    public void onParentHeightUpdate() {
        if (mParent == null
                || (mLeftMenuItems.isEmpty() && mRightMenuItems.isEmpty())
                || mMenuContainer == null) {
            return;
        }
        int parentHeight = mParent.getActualHeight();
        float translationY;
        if (parentHeight < mVertSpaceForIcons) {
            translationY = (parentHeight / 2) - (mHorizSpaceForIcon / 2);
        } else {
            translationY = (mVertSpaceForIcons - mHorizSpaceForIcon) / 2;
        }
        mMenuContainer.setTranslationY(translationY);
    }
Example 19
private ArrayList<Entry> array;

	public synchronized Entry firstValue() {
		if (array.isEmpty())
			return null;
		else {
			return array.get(0);
		}
	}
Example 20
public void onSelected()
   {
      super.onSelected();
      
      table_.focus();
      ArrayList<Integer> indices = table_.getSelectedRowIndexes();
      if (indices.isEmpty())
         table_.selectNextRow();
   }
Example 21
private final ArrayList<Runnable> mTasks = new ArrayList<>();

    public void executePostInitTasks() {
        while (!mTasks.isEmpty()) {
            mTasks.remove(0).run();
        }

        mTasksExecuted = true;
    }
Example 22
/*package*/ void process() {
    if (!(isProcessingAllowed())) {
      return;
    }
    ArrayList<T> tasks = new ArrayList();
    myTasks.drainTo(tasks);
    if (tasks.isEmpty()) {
      return;
    }
    processTask(tasks);
  }
Example 23
public void setLast(T obj)
   {
      ArrayList<T> stack = getStack(true);
      if (stack.isEmpty())
      {
         stack.add(obj);
      }
      else
      {
         stack.set(stack.size() - 1, obj);
      }
   }
Example 24
public static final void quickSort(ArrayList elements)
	{
		if (!elements.isEmpty())
		{
			quickSort(elements, 0, elements.size() - 1);
		}
	}
Example 25
private boolean isIndexUsable(ArrayList<String> indexColumns) {
        if (indexColumns.isEmpty()) {
            return false;
        }
        for (String c : indexColumns) {
            if (findColumnIndex(c) < 0) {
                return false;
            }
        }
        return true;
    }