From e7f4e8f3feba0797b16c48299de5f35a347800a2 Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Mon, 10 Sep 2012 08:44:39 +0300 Subject: [PATCH] Remove unused exception class reintroduced in a merge. --- .../RangeOutOfContainerBoundsException.java | 169 ------------------ 1 file changed, 169 deletions(-) delete mode 100644 server/src/com/vaadin/data/RangeOutOfContainerBoundsException.java diff --git a/server/src/com/vaadin/data/RangeOutOfContainerBoundsException.java b/server/src/com/vaadin/data/RangeOutOfContainerBoundsException.java deleted file mode 100644 index 43058e45d8..0000000000 --- a/server/src/com/vaadin/data/RangeOutOfContainerBoundsException.java +++ /dev/null @@ -1,169 +0,0 @@ -package com.vaadin.data; - -/** - * A exception that indicates that the container is unable to return all of the - * consecutive item ids requested by the caller. This can happen if the - * container size has changed since the input parameters for - * {@link Container.Indexed#getItemIds(int, int)} were computed or if the - * requested range exceeds the containers size due to some other factor.
- *
- * - * The exception can contain additional parameters for easier debugging. The - * additional parameters are the startIndex and - * numberOfIds which were given to - * {@link Container.Indexed#getItemIds(int, int)} as well as the size of the - * container when the fetch was executed. The container size can be retrieved - * with {@link #getContainerCurrentSize()}.
- *
- * - * The additional parameters are optional but the party that received the - * exception can check whether or not these were set by calling - * {@link #isAdditionalParametersSet()}. - * - * @since 7.0 - */ -public class RangeOutOfContainerBoundsException extends RuntimeException { - - private final int startIndex; - private final int numberOfIds; - private final int containerCurrentSize; - private final boolean additionalParametersSet; - - // Discourage users to create exceptions without at least some kind of - // message... - private RangeOutOfContainerBoundsException() { - super(); - startIndex = -1; - numberOfIds = -1; - containerCurrentSize = -1; - additionalParametersSet = false; - } - - public RangeOutOfContainerBoundsException(String message) { - super(message); - startIndex = -1; - numberOfIds = -1; - containerCurrentSize = -1; - additionalParametersSet = false; - } - - public RangeOutOfContainerBoundsException(String message, - Throwable throwable) { - super(message, throwable); - startIndex = -1; - numberOfIds = -1; - containerCurrentSize = -1; - additionalParametersSet = false; - } - - public RangeOutOfContainerBoundsException(Throwable throwable) { - super(throwable); - startIndex = -1; - numberOfIds = -1; - containerCurrentSize = -1; - additionalParametersSet = false; - } - - /** - * Create a new {@link RangeOutOfContainerBoundsException} with the - * additional parameters: - * - * given. - * - * @param message - * @param startIndex - * the given startIndex for the query - * @param numberOfIds - * the number of item ids requested - * @param containerCurrentSize - * the current size of the container - */ - public RangeOutOfContainerBoundsException(String message, int startIndex, - int numberOfIds, int containerCurrentSize) { - super(message); - - this.startIndex = startIndex; - this.numberOfIds = numberOfIds; - this.containerCurrentSize = containerCurrentSize; - additionalParametersSet = true; - } - - /** - * Create a new {@link RangeOutOfContainerBoundsException} with the given - * query parameters set in the exception along with the containers current - * size and a @link {@link Throwable}. - * - * @param message - * @param startIndex - * the given startIndex for the query - * @param numberOfIds - * the number of item ids queried for - * @param containerCurrentSize - * the current size of the container - * @param throwable - */ - public RangeOutOfContainerBoundsException(String message, int startIndex, - int numberOfIds, int containerCurrentSize, Throwable throwable) { - super(message, throwable); - - this.startIndex = startIndex; - this.numberOfIds = numberOfIds; - this.containerCurrentSize = containerCurrentSize; - additionalParametersSet = true; - } - - /** - * Get the given startIndex for the query. Remember to check if this - * parameter is set by calling {@link #isAdditionalParametersSet()} - * - * @return the startIndex given to the container - */ - public int getStartIndex() { - return startIndex; - } - - /** - * Get the number of item ids requested. Remember to check if this parameter - * is set with {@link #isAdditionalParametersSet()} - * - * @return the number of item ids the container was ordered to fetch - */ - public int getNumberOfIds() { - return numberOfIds; - } - - /** - * Get the container size when the query was actually executed. Remember to - * check if this parameter is set with {@link #isAdditionalParametersSet()} - */ - public int getContainerCurrentSize() { - return containerCurrentSize; - } - - /** - * Check whether or not the additional parameters for the exception were set - * during creation or not. - * - * The additional parameters can be retrieved with:
- * - * - * @return true if parameters are set, false otherwise. - * - * @see #RangeOutOfContainerBoundsException(String, int, int, int) - * RangeOutOfContainerBoundsException(String, int, int, int) for more - * details on the additional parameters - */ - public boolean isAdditionalParametersSet() { - return additionalParametersSet; - } - -} -- 2.39.5