< prev index next >
src/java.base/share/classes/java/text/BreakIterator.java
Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea
*** 1,7 ****
/*
! * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 325,335 ****
* <code>BreakIterator.DONE</code>.
* @param offset the character offset to begin scanning.
* @return The first boundary after the specified offset or
* <code>BreakIterator.DONE</code> if the last text boundary is passed in
* as the offset.
! * @exception IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
*/
public abstract int following(int offset);
/**
--- 325,335 ----
* <code>BreakIterator.DONE</code>.
* @param offset the character offset to begin scanning.
* @return The first boundary after the specified offset or
* <code>BreakIterator.DONE</code> if the last text boundary is passed in
* as the offset.
! * @throws IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
*/
public abstract int following(int offset);
/**
*** 341,351 ****
* <code>BreakIterator.DONE</code>.
* @param offset the character offset to begin scanning.
* @return The last boundary before the specified offset or
* <code>BreakIterator.DONE</code> if the first text boundary is passed in
* as the offset.
! * @exception IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
* @since 1.2
*/
public int preceding(int offset) {
// NOTE: This implementation is here solely because we can't add new
--- 341,351 ----
* <code>BreakIterator.DONE</code>.
* @param offset the character offset to begin scanning.
* @return The last boundary before the specified offset or
* <code>BreakIterator.DONE</code> if the first text boundary is passed in
* as the offset.
! * @throws IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
* @since 1.2
*/
public int preceding(int offset) {
// NOTE: This implementation is here solely because we can't add new
*** 361,371 ****
/**
* Returns true if the specified character offset is a text boundary.
* @param offset the character offset to check.
* @return <code>true</code> if "offset" is a boundary position,
* <code>false</code> otherwise.
! * @exception IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
* @since 1.2
*/
public boolean isBoundary(int offset) {
// NOTE: This implementation probably is wrong for most situations
--- 361,371 ----
/**
* Returns true if the specified character offset is a text boundary.
* @param offset the character offset to check.
* @return <code>true</code> if "offset" is a boundary position,
* <code>false</code> otherwise.
! * @throws IllegalArgumentException if the specified offset is less than
* the first text boundary or greater than the last text boundary.
* @since 1.2
*/
public boolean isBoundary(int offset) {
// NOTE: This implementation probably is wrong for most situations
*** 451,461 ****
* Returns a new <code>BreakIterator</code> instance
* for <a href="BreakIterator.html#word">word breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for word breaks
! * @exception NullPointerException if <code>locale</code> is null
*/
public static BreakIterator getWordInstance(Locale locale)
{
return getBreakInstance(locale, WORD_INDEX);
}
--- 451,461 ----
* Returns a new <code>BreakIterator</code> instance
* for <a href="BreakIterator.html#word">word breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for word breaks
! * @throws NullPointerException if <code>locale</code> is null
*/
public static BreakIterator getWordInstance(Locale locale)
{
return getBreakInstance(locale, WORD_INDEX);
}
*** 475,485 ****
* Returns a new <code>BreakIterator</code> instance
* for <a href="BreakIterator.html#line">line breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for line breaks
! * @exception NullPointerException if <code>locale</code> is null
*/
public static BreakIterator getLineInstance(Locale locale)
{
return getBreakInstance(locale, LINE_INDEX);
}
--- 475,485 ----
* Returns a new <code>BreakIterator</code> instance
* for <a href="BreakIterator.html#line">line breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for line breaks
! * @throws NullPointerException if <code>locale</code> is null
*/
public static BreakIterator getLineInstance(Locale locale)
{
return getBreakInstance(locale, LINE_INDEX);
}
*** 499,509 ****
* Returns a new <code>BreakIterator</code> instance
* for <a href="BreakIterator.html#character">character breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for character breaks
! * @exception NullPointerException if <code>locale</code> is null
*/
public static BreakIterator getCharacterInstance(Locale locale)
{
return getBreakInstance(locale, CHARACTER_INDEX);
}
--- 499,509 ----
* Returns a new <code>BreakIterator</code> instance
* for <a href="BreakIterator.html#character">character breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for character breaks
! * @throws NullPointerException if <code>locale</code> is null
*/
public static BreakIterator getCharacterInstance(Locale locale)
{
return getBreakInstance(locale, CHARACTER_INDEX);
}
*** 523,533 ****
* Returns a new <code>BreakIterator</code> instance
* for <a href="BreakIterator.html#sentence">sentence breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for sentence breaks
! * @exception NullPointerException if <code>locale</code> is null
*/
public static BreakIterator getSentenceInstance(Locale locale)
{
return getBreakInstance(locale, SENTENCE_INDEX);
}
--- 523,533 ----
* Returns a new <code>BreakIterator</code> instance
* for <a href="BreakIterator.html#sentence">sentence breaks</a>
* for the given locale.
* @param locale the desired locale
* @return A break iterator for sentence breaks
! * @throws NullPointerException if <code>locale</code> is null
*/
public static BreakIterator getSentenceInstance(Locale locale)
{
return getBreakInstance(locale, SENTENCE_INDEX);
}
< prev index next >