/*
********************************************************************************
-* Copyright (C) 1997-2011, International Business Machines
+* Copyright (C) 1997-2012, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
};
/**
- * Return the index of the first character in the text being scanned.
+ * Set the iterator position to the index of the first character in the text being scanned.
+ * @return The index of the first character in the text being scanned.
* @stable ICU 2.0
*/
virtual int32_t first(void) = 0;
/**
- * Return the index immediately BEYOND the last character in the text being scanned.
+ * Set the iterator position to the index immediately BEYOND the last character in the text being scanned.
+ * @return The index immediately BEYOND the last character in the text being scanned.
* @stable ICU 2.0
*/
virtual int32_t last(void) = 0;
/**
- * Return the boundary preceding the current boundary.
+ * Set the iterator position to the boundary preceding the current boundary.
* @return The character index of the previous text boundary or DONE if all
* boundaries have been returned.
* @stable ICU 2.0
virtual int32_t previous(void) = 0;
/**
- * Return the boundary following the current boundary.
+ * Advance the iterator to the boundary following the current boundary.
* @return The character index of the next text boundary or DONE if all
* boundaries have been returned.
* @stable ICU 2.0
virtual int32_t current(void) const = 0;
/**
- * Return the first boundary following the specified offset.
+ * Advance the iterator to the first boundary following the specified offset.
* The value returned is always greater than the offset or
* the value BreakIterator.DONE
* @param offset the offset to begin scanning.
virtual int32_t following(int32_t offset) = 0;
/**
- * Return the first boundary preceding the specified offset.
+ * Set the iterator position to the first boundary preceding the specified offset.
* The value returned is always smaller than the offset or
* the value BreakIterator.DONE
* @param offset the offset to begin scanning.
virtual UBool isBoundary(int32_t offset) = 0;
/**
- * Return the nth boundary from the current boundary
- * @param n which boundary to return. A value of 0
+ * Set the iterator position to the nth boundary from the current boundary
+ * @param n the number of boundaries to move by. A value of 0
* does nothing. Negative values move to previous boundaries
* and positive values move to later boundaries.
- * @return The index of the nth boundary from the current position, or
+ * @return The new iterator position, or
* DONE if there are fewer than |n| boundaries in the specfied direction.
* @stable ICU 2.0
*/
/*
******************************************************************************
-* Copyright (C) 1996-2011, International Business Machines Corporation and others.
+* Copyright (C) 1996-2012, International Business Machines Corporation and others.
* All Rights Reserved.
******************************************************************************
*/
ubrk_current(const UBreakIterator *bi);
/**
- * Determine the text boundary following the current text boundary.
+ * Advance the iterator to the boundary following the current boundary.
*
* @param bi The break iterator to use.
* @return The character index of the next text boundary, or UBRK_DONE
ubrk_next(UBreakIterator *bi);
/**
- * Determine the text boundary preceding the current text boundary.
+ * Set the iterator position to the boundary preceding the current boundary.
*
* @param bi The break iterator to use.
* @return The character index of the preceding text boundary, or UBRK_DONE
ubrk_previous(UBreakIterator *bi);
/**
- * Determine the index of the first character in the text being scanned.
+ * Set the iterator position to the index of the first character in the text being scanned.
* This is not always the same as index 0 of the text.
* @param bi The break iterator to use.
* @return The character index of the first character in the text being scanned.
ubrk_first(UBreakIterator *bi);
/**
- * Determine the index immediately <EM>beyond</EM> the last character in the text being
- * scanned.
+ * Set the iterator position to the index immediately <EM>beyond</EM> the last character in the text being scanned.
* This is not the same as the last character.
* @param bi The break iterator to use.
* @return The character offset immediately <EM>beyond</EM> the last character in the
ubrk_last(UBreakIterator *bi);
/**
- * Determine the text boundary preceding the specified offset.
- * The value returned is always smaller than offset, or UBRK_DONE.
+ * Set the iterator position to the first boundary preceding the specified offset.
+ * The new position is always smaller than offset, or UBRK_DONE.
* @param bi The break iterator to use.
* @param offset The offset to begin scanning.
* @return The text boundary preceding offset, or UBRK_DONE.
int32_t offset);
/**
- * Determine the text boundary following the specified offset.
+ * Advance the iterator to the first boundary following the specified offset.
* The value returned is always greater than offset, or UBRK_DONE.
* @param bi The break iterator to use.
* @param offset The offset to begin scanning.