本文整理汇总了Java中org.apache.commons.math.MathRuntimeException.createConcurrentModificationException方法的典型用法代码示例。如果您正苦于以下问题:Java MathRuntimeException.createConcurrentModificationException方法的具体用法?Java MathRuntimeException.createConcurrentModificationException怎么用?Java MathRuntimeException.createConcurrentModificationException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.math.MathRuntimeException
的用法示例。
在下文中一共展示了MathRuntimeException.createConcurrentModificationException方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: advance
import org.apache.commons.math.MathRuntimeException; //导入方法依赖的package包/类
/**
* Advance iterator one step further.
* @exception ConcurrentModificationException if the map is modified during iteration
* @exception NoSuchElementException if there is no element left in the map
*/
public void advance()
throws ConcurrentModificationException, NoSuchElementException {
if (referenceCount != count) {
throw MathRuntimeException.createConcurrentModificationException("map has been modified while iterating");
}
// advance on step
current = next;
// prepare next step
try {
while (states[++next] != FULL) {
// nothing to do
}
} catch (ArrayIndexOutOfBoundsException e) {
next = -2;
if (current < 0) {
throw MathRuntimeException.createNoSuchElementException("iterator exhausted");
}
}
}
示例2: advance
import org.apache.commons.math.MathRuntimeException; //导入方法依赖的package包/类
/**
* Advance iterator one step further.
* @exception ConcurrentModificationException if the map is modified during iteration
* @exception NoSuchElementException if there is no element left in the map
*/
public void advance()
throws ConcurrentModificationException, NoSuchElementException {
if (referenceCount != count) {
throw MathRuntimeException.createConcurrentModificationException(
CONCURRENT_MODIFICATION_MESSAGE);
}
// advance on step
current = next;
// prepare next step
try {
while (states[++next] != FULL) {
// nothing to do
}
} catch (ArrayIndexOutOfBoundsException e) {
next = -2;
if (current < 0) {
throw MathRuntimeException.createNoSuchElementException(EXHAUSTED_ITERATOR_MESSAGE);
}
}
}
示例3: advance
import org.apache.commons.math.MathRuntimeException; //导入方法依赖的package包/类
/**
* Advance iterator one step further.
* @exception ConcurrentModificationException if the map is modified during iteration
* @exception NoSuchElementException if there is no element left in the map
*/
public void advance()
throws ConcurrentModificationException, NoSuchElementException {
if (referenceCount != count) {
throw MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
}
// advance on step
current = next;
// prepare next step
try {
while (states[++next] != FULL) {
// nothing to do
}
} catch (ArrayIndexOutOfBoundsException e) {
next = -2;
if (current < 0) {
throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
}
}
}
示例4: value
import org.apache.commons.math.MathRuntimeException; //导入方法依赖的package包/类
/**
* Get the value of current entry.
* @return value of current entry
* @exception ConcurrentModificationException if the map is modified during iteration
* @exception NoSuchElementException if there is no element left in the map
*/
public double value()
throws ConcurrentModificationException, NoSuchElementException {
if (referenceCount != count) {
throw MathRuntimeException.createConcurrentModificationException(
CONCURRENT_MODIFICATION_MESSAGE);
}
if (current < 0) {
throw MathRuntimeException.createNoSuchElementException(EXHAUSTED_ITERATOR_MESSAGE);
}
return values[current];
}
示例5: value
import org.apache.commons.math.MathRuntimeException; //导入方法依赖的package包/类
/**
* Get the value of current entry.
* @return value of current entry
* @exception ConcurrentModificationException if the map is modified during iteration
* @exception NoSuchElementException if there is no element left in the map
*/
public double value()
throws ConcurrentModificationException, NoSuchElementException {
if (referenceCount != count) {
throw MathRuntimeException.createConcurrentModificationException("map has been modified while iterating");
}
if (current < 0) {
throw MathRuntimeException.createNoSuchElementException("iterator exhausted");
}
return values[current];
}
示例6: key
import org.apache.commons.math.MathRuntimeException; //导入方法依赖的package包/类
/**
* Get the key of current entry.
* @return key of current entry
* @exception ConcurrentModificationException if the map is modified during iteration
* @exception NoSuchElementException if there is no element left in the map
*/
public int key()
throws ConcurrentModificationException, NoSuchElementException {
if (referenceCount != count) {
throw MathRuntimeException.createConcurrentModificationException(
CONCURRENT_MODIFICATION_MESSAGE);
}
if (current < 0) {
throw MathRuntimeException.createNoSuchElementException(EXHAUSTED_ITERATOR_MESSAGE);
}
return keys[current];
}
示例7: key
import org.apache.commons.math.MathRuntimeException; //导入方法依赖的package包/类
/**
* Get the key of current entry.
* @return key of current entry
* @exception ConcurrentModificationException if the map is modified during iteration
* @exception NoSuchElementException if there is no element left in the map
*/
public int key()
throws ConcurrentModificationException, NoSuchElementException {
if (referenceCount != count) {
throw MathRuntimeException.createConcurrentModificationException("map has been modified while iterating");
}
if (current < 0) {
throw MathRuntimeException.createNoSuchElementException("iterator exhausted");
}
return keys[current];
}
示例8: value
import org.apache.commons.math.MathRuntimeException; //导入方法依赖的package包/类
/**
* Get the value of current entry.
* @return value of current entry
* @exception ConcurrentModificationException if the map is modified during iteration
* @exception NoSuchElementException if there is no element left in the map
*/
public T value()
throws ConcurrentModificationException, NoSuchElementException {
if (referenceCount != count) {
throw MathRuntimeException.createConcurrentModificationException("map has been modified while iterating");
}
if (current < 0) {
throw MathRuntimeException.createNoSuchElementException("iterator exhausted");
}
return values[current];
}
示例9: value
import org.apache.commons.math.MathRuntimeException; //导入方法依赖的package包/类
/**
* Get the value of current entry.
* @return value of current entry
* @exception ConcurrentModificationException if the map is modified during iteration
* @exception NoSuchElementException if there is no element left in the map
*/
public double value()
throws ConcurrentModificationException, NoSuchElementException {
if (referenceCount != count) {
throw MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
}
if (current < 0) {
throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
}
return values[current];
}