Java Code Examples for org.apache.commons.math.MathRuntimeException#createNoSuchElementException()

The following examples show how to use org.apache.commons.math.MathRuntimeException#createNoSuchElementException() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OpenIntToDoubleHashMap.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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");
        }
    }

}
 
Example 2
Source File: OpenIntToFieldHashMap.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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");
        }
    }

}
 
Example 3
Source File: Arja_0032_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example 4
Source File: OpenIntToFieldHashMap.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example 5
Source File: OpenIntToFieldHashMap.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example 6
Source File: OpenIntToFieldHashMap.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example 7
Source File: OpenIntToFieldHashMap.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example 8
Source File: OpenIntToDoubleHashMap.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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];
}
 
Example 9
Source File: OpenIntToFieldHashMap.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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];
}
 
Example 10
Source File: OpenIntToDoubleHashMap.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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];
}
 
Example 11
Source File: Arja_00157_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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];
}
 
Example 12
Source File: JGenProg2017_00132_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
    }
    if (current < 0) {
        throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
    }
    return keys[current];
}
 
Example 13
Source File: Arja_00126_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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];
}
 
Example 14
Source File: OpenIntToDoubleHashMap.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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];
}
 
Example 15
Source File: OpenIntToFieldHashMap.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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];
}
 
Example 16
Source File: OpenIntToDoubleHashMap.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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];
}
 
Example 17
Source File: Cardumen_00284_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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];
}
 
Example 18
Source File: Arja_00107_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
    }
    if (current < 0) {
        throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
    }
    return keys[current];
}
 
Example 19
Source File: JGenProg2017_00113_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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];
}
 
Example 20
Source File: JGenProg2017_00113_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
    }
    if (current < 0) {
        throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
    }
    return keys[current];
}