/** * Add the element to the specified bundle. * The bundle is represented by its order in the queue. It is not possible to * add the element to a bundle, which already exists and is not the last * bundle in the queue. * * @param bundle the bundle to which the specified <code>element</code> will be added. * @param element the element to add. */ public void add(final int bundle, final E element) { if (lastElementAbsoluteDistance > bundle) { throw new IllegalStateException("New element must have greater" + " absolute distance than the last element in the queue"); } internalQueue.addLast(new Record<>(element, bundle - lastElementAbsoluteDistance)); lastElementAbsoluteDistance = bundle; }
/** * Add the element to the specified bundle. * The bundle is represented by its order in the queue. It is not possible to * add the element to a bundle, which already exists and is not the last * bundle in the queue. * * @param bundle the bundle to which the specified <code>element</code> will be added. * @param element the element to add. */ public void add(final int bundle, final E element) { if (lastElementAbsoluteDistance > bundle) { throw new IllegalStateException("New element must have greater" + " absolute distance than the last element in the queue"); } internalQueue.addLast(new Record<>(element, bundle - lastElementAbsoluteDistance)); lastElementAbsoluteDistance = bundle; }
/** * Add the element to the specified bundle. * The bundle is represented by its order in the queue. It is not possible to * add the element to a bundle, which already exists and is not the last * bundle in the queue. * * @param bundle the bundle to which the specified <code>element</code> will be added. * @param element the element to add. */ public void add(final int bundle, final E element) { if (lastElementAbsoluteDistance > bundle) { throw new IllegalStateException("New element must have greater" + " absolute distance than the last element in the queue"); } internalQueue.addLast(new Record<>(element, bundle - lastElementAbsoluteDistance)); lastElementAbsoluteDistance = bundle; }
/** * Add the element to the specified bundle. * The bundle is represented by its order in the queue. It is not possible to * add the element to a bundle, which already exists and is not the last * bundle in the queue. * * @param bundle the bundle to which the specified <code>element</code> will be added. * @param element the element to add. */ public void add(final int bundle, final E element) { if (lastElementAbsoluteDistance > bundle) { throw new IllegalStateException("New element must have greater" + " absolute distance than the last element in the queue"); } internalQueue.addLast(new Record<>(element, bundle - lastElementAbsoluteDistance)); lastElementAbsoluteDistance = bundle; }
/** * Add the element to the specified bundle. * The bundle is represented by its order in the queue. It is not possible to * add the element to a bundle, which already exists and is not the last * bundle in the queue. * * @param bundle the bundle to which the specified <code>element</code> will be added. * @param element the element to add. */ public void add(final int bundle, final E element) { if (lastElementAbsoluteDistance > bundle) { throw new IllegalStateException("New element must have greater" + " absolute distance than the last element in the queue"); } internalQueue.addLast(new Record<>(element, bundle - lastElementAbsoluteDistance)); lastElementAbsoluteDistance = bundle; }
/** * Add the element to the specified bundle. * The bundle is represented by its order in the queue. It is not possible to * add the element to a bundle, which already exists and is not the last * bundle in the queue. * * @param bundle the bundle to which the specified <code>element</code> will be added. * @param element the element to add. */ public void add(final int bundle, final E element) { if (lastElementAbsoluteDistance > bundle) { throw new IllegalStateException("New element must have greater" + " absolute distance than the last element in the queue"); } internalQueue.addLast(new Record<>(element, bundle - lastElementAbsoluteDistance)); lastElementAbsoluteDistance = bundle; }
/** * Add the element to the specified bundle. * The bundle is represented by its order in the queue. It is not possible to * add the element to a bundle, which already exists and is not the last * bundle in the queue. * * @param bundle the bundle to which the specified <code>element</code> will be added. * @param element the element to add. */ public void add(final int bundle, final E element) { if (lastElementAbsoluteDistance > bundle) { throw new IllegalStateException("New element must have greater" + " absolute distance than the last element in the queue"); } internalQueue.addLast(new Record<>(element, bundle - lastElementAbsoluteDistance)); lastElementAbsoluteDistance = bundle; }
/** * Add the element to the specified bundle. * The bundle is represented by its order in the queue. It is not possible to * add the element to a bundle, which already exists and is not the last * bundle in the queue. * * @param bundle the bundle to which the specified <code>element</code> will be added. * @param element the element to add. */ public void add(final int bundle, final E element) { if (lastElementAbsoluteDistance > bundle) { throw new IllegalStateException("New element must have greater" + " absolute distance than the last element in the queue"); } internalQueue.addLast(new Record<>(element, bundle - lastElementAbsoluteDistance)); lastElementAbsoluteDistance = bundle; }
/** * Add the element to the specified bundle. * The bundle is represented by its order in the queue. It is not possible to * add the element to a bundle, which already exists and is not the last * bundle in the queue. * * @param bundle the bundle to which the specified <code>element</code> will be added. * @param element the element to add. */ public void add(final int bundle, final E element) { if (lastElementAbsoluteDistance > bundle) { throw new IllegalStateException("New element must have greater" + " absolute distance than the last element in the queue"); } internalQueue.addLast(new Record<>(element, bundle - lastElementAbsoluteDistance)); lastElementAbsoluteDistance = bundle; }