/** * Checks if index is in range: 0 <= index < getSize(). * * @param index possible start position that we will check for validity * @return <code>true</code> if given parameter is valid index */ protected boolean isValidIndex(int index) { return index >= 0 && index < getSize(); }
/** * Checks if index is in range: 0 <= index < getSize(). * * @param index possible start position that we will check for validity * @return <code>true</code> if given parameter is valid index */ protected boolean isValidIndex(int index) { return index >= 0 && index < getSize(); }
/** * Checks if index is in range: 0 <= index < getSize(). * * @param index possible start position that we will check for validity * @return <code>true</code> if given parameter is valid index */ protected boolean isValidIndex(int index) { return index >= 0 && index < getSize(); }
/** * Checks if index is in range: 0 <= index < getSize(). * * @param index possible start position that we will check for validity * @return <code>true</code> if given parameter is valid index */ protected boolean isValidIndex(int index) { return index >= 0 && index < getSize(); }
/** * Checks if index is in range: 0 <= index < getSize(). * * @param index possible start position that we will check for validity * @return <code>true</code> if given parameter is valid index */ protected boolean isValidIndex(int index) { return index >= 0 && index < getSize(); }
/** * Returns a boolean indicating if it can be trivially decided to not match. * <p> * * This implementation returns true if pattern is null or startIndex * exceeds the upper size limit.<p> * * @param pattern <code>Pattern</code> that we will try to locate * @param startIndex position in the document in the appropriate coordinates * from which we will start search or -1 to start from the beginning * @return true if we can say ahead that no match will be found with given search criteria */ protected boolean isTrivialNoMatch(Pattern pattern, final int startIndex) { return (pattern == null) || (startIndex >= getSize()); }
/** * Returns a boolean indicating if it can be trivially decided to not match. * <p> * * This implementation returns true if pattern is null or startIndex * exceeds the upper size limit.<p> * * @param pattern <code>Pattern</code> that we will try to locate * @param startIndex position in the document in the appropriate coordinates * from which we will start search or -1 to start from the beginning * @return true if we can say ahead that no match will be found with given search criteria */ protected boolean isTrivialNoMatch(Pattern pattern, final int startIndex) { return (pattern == null) || (startIndex >= getSize()); }
/** * Returns a boolean indicating if it can be trivially decided to not match. * <p> * * This implementation returns true if pattern is null or startIndex * exceeds the upper size limit.<p> * * @param pattern <code>Pattern</code> that we will try to locate * @param startIndex position in the document in the appropriate coordinates * from which we will start search or -1 to start from the beginning * @return true if we can say ahead that no match will be found with given search criteria */ protected boolean isTrivialNoMatch(Pattern pattern, final int startIndex) { return (pattern == null) || (startIndex >= getSize()); }
/** * Returns a boolean indicating if it can be trivially decided to not match. * <p> * * This implementation returns true if pattern is null or startIndex * exceeds the upper size limit.<p> * * @param pattern <code>Pattern</code> that we will try to locate * @param startIndex position in the document in the appropriate coordinates * from which we will start search or -1 to start from the beginning * @return true if we can say ahead that no match will be found with given search criteria */ protected boolean isTrivialNoMatch(Pattern pattern, final int startIndex) { return (pattern == null) || (startIndex >= getSize()); }
/** * Returns a boolean indicating if it can be trivially decided to not match. * <p> * * This implementation returns true if pattern is null or startIndex * exceeds the upper size limit.<p> * * @param pattern <code>Pattern</code> that we will try to locate * @param startIndex position in the document in the appropriate coordinates * from which we will start search or -1 to start from the beginning * @return true if we can say ahead that no match will be found with given search criteria */ protected boolean isTrivialNoMatch(Pattern pattern, final int startIndex) { return (pattern == null) || (startIndex >= getSize()); }
/** * Called if <code>startIndex</code> is different from last search * and make sure a backwards/forwards search starts at last/first row, * respectively.<p> * * @param startIndex position in the document in the appropriate coordinates * from which we will start search or -1 to start from the beginning * @param backwards <code>true</code> if we should perform search from towards the beginning * @return adjusted <code>startIndex</code> */ protected int adjustStartPosition(int startIndex, boolean backwards) { if (startIndex < 0) { if (backwards) { return getSize() - 1; } else { return 0; } } return startIndex; }
/** * Called if <code>startIndex</code> is different from last search * and make sure a backwards/forwards search starts at last/first row, * respectively.<p> * * @param startIndex position in the document in the appropriate coordinates * from which we will start search or -1 to start from the beginning * @param backwards <code>true</code> if we should perform search from towards the beginning * @return adjusted <code>startIndex</code> */ protected int adjustStartPosition(int startIndex, boolean backwards) { if (startIndex < 0) { if (backwards) { return getSize() - 1; } else { return 0; } } return startIndex; }
/** * Called if <code>startIndex</code> is different from last search * and make sure a backwards/forwards search starts at last/first row, * respectively.<p> * * @param startIndex position in the document in the appropriate coordinates * from which we will start search or -1 to start from the beginning * @param backwards <code>true</code> if we should perform search from towards the beginning * @return adjusted <code>startIndex</code> */ protected int adjustStartPosition(int startIndex, boolean backwards) { if (startIndex < 0) { if (backwards) { return getSize() - 1; } else { return 0; } } return startIndex; }
/** * Called if <code>startIndex</code> is different from last search * and make sure a backwards/forwards search starts at last/first row, * respectively.<p> * * @param startIndex position in the document in the appropriate coordinates * from which we will start search or -1 to start from the beginning * @param backwards <code>true</code> if we should perform search from towards the beginning * @return adjusted <code>startIndex</code> */ protected int adjustStartPosition(int startIndex, boolean backwards) { if (startIndex < 0) { if (backwards) { return getSize() - 1; } else { return 0; } } return startIndex; }
/** * Called if <code>startIndex</code> is different from last search * and make sure a backwards/forwards search starts at last/first row, * respectively.<p> * * @param startIndex position in the document in the appropriate coordinates * from which we will start search or -1 to start from the beginning * @param backwards <code>true</code> if we should perform search from towards the beginning * @return adjusted <code>startIndex</code> */ protected int adjustStartPosition(int startIndex, boolean backwards) { if (startIndex < 0) { if (backwards) { return getSize() - 1; } else { return 0; } } return startIndex; }