当前位置: 首页>>代码示例>>Java>>正文


Java MathRuntimeException.createConcurrentModificationException方法代码示例

本文整理汇总了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");
        }
    }

}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:29,代码来源:OpenIntToFieldHashMap.java

示例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);
        }
    }

}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:30,代码来源:OpenIntToDoubleHashMap.java

示例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);
        }
    }

}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:29,代码来源:OpenIntToDoubleHashMap.java

示例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];
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:18,代码来源:OpenIntToDoubleHashMap.java

示例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];
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:17,代码来源:OpenIntToDoubleHashMap.java

示例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];
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:18,代码来源:OpenIntToFieldHashMap.java

示例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];
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:17,代码来源:OpenIntToDoubleHashMap.java

示例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];
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:17,代码来源:OpenIntToFieldHashMap.java

示例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];
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:17,代码来源:OpenIntToDoubleHashMap.java


注:本文中的org.apache.commons.math.MathRuntimeException.createConcurrentModificationException方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。