/** * Check if the queue is full. * * @return True if the queue is full. */ public boolean isFull() { if (maximumSize != UNLIMITED_MAXIMUM_SIZE && size() >= maximumSize) return true; return false; }
/** * Check if the queue is empty. * * @return True if the queue is empty. */ public boolean isEmpty() { if (size() <= 0) return true; return false; }