Guava AtomicDoubleArray - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Guava AtomicDoubleArray class.

This code example shows how to use the following methods:length, set
	} 
 
	@Override 
	public void update(double value) {
		final long c = count.incrementAndGet();
		if (c <= values.length()) {
			values.set((int) c - 1, value);
		} else { 
			final long r = nextLong(c);
			if (r < values.length()) {
				values.set((int) r, value);
			} 
		} 
	} 
 
	/** 
	 * Get a pseudo-random long uniformly between 0 and n-1. Stolen from 
	 * {@link java.util.Random#nextInt()}. 
	 * 
	 * @param n the bound 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:get
	} 
	 
	@Override 
	public final double get(int index)
	{ 
		return _values.get(index);
	} 
	 
	@Override 
	public @Nullable SharedParameterValue getSharedValue(int index)
	{ 
		assertIndexInRange(index);
		return null; 
	} 
 
	@Override 
	public final boolean isFixed(int index)
	{ 
		assertIndexInRange(index);
		int bit = 1 << (index & 31);
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Guava AtomicDoubleArray Methods: