本文整理了Java中java.lang.Math.incrementExact()
方法的一些代码示例,展示了Math.incrementExact()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Math.incrementExact()
方法的具体详情如下:
包路径:java.lang.Math
类名称:Math
方法名:incrementExact
暂无
代码示例来源:origin: neo4j/neo4j
public void acquireReference()
{
refCount = Math.incrementExact( refCount );
}
代码示例来源:origin: neo4j/neo4j
synchronized void mark()
{
marked = Math.incrementExact( marked );
}
代码示例来源:origin: neo4j/neo4j
void incrementRequests()
{
requests = Math.incrementExact( requests );
}
代码示例来源:origin: neo4j/neo4j
private void registerReadLockAcquired( Object tx, TxLockElement tle )
{
registerLockAcquired( tx, tle );
totalReadCount = Math.incrementExact( totalReadCount );
tle.readCount = Math.incrementExact( tle.readCount );
}
代码示例来源:origin: neo4j/neo4j
private void registerWriteLockAcquired( Object tx, TxLockElement tle )
{
registerLockAcquired( tx, tle );
totalWriteCount = Math.incrementExact( totalWriteCount );
tle.writeCount = Math.incrementExact( tle.writeCount );
}
代码示例来源:origin: neo4j/neo4j
private int incrementActiveClients( int clientState )
{
return getStatus( clientState ) | Math.incrementExact( getActiveClients( clientState ) );
}
代码示例来源:origin: org.neo4j/neo4j-kernel
synchronized void mark()
{
marked = Math.incrementExact( marked );
}
代码示例来源:origin: org.neo4j/neo4j-kernel
void incrementRequests()
{
requests = Math.incrementExact( requests );
}
代码示例来源:origin: org.neo4j/neo4j-kernel
public void acquireReference()
{
refCount = Math.incrementExact( refCount );
}
代码示例来源:origin: nlpie/biomedicus
public void incrementTruePositives() {
truePositives = Math.incrementExact(truePositives);
}
代码示例来源:origin: nlpie/biomedicus
public void incrementFalsePositives() {
falsePositives = Math.incrementExact(falsePositives);
}
代码示例来源:origin: nlpie/biomedicus
public void incrementTrueNegatives() {
trueNegatives = Math.incrementExact(trueNegatives);
}
代码示例来源:origin: nlpie/biomedicus
public void incrementFalseNegatives() {
falseNegatives = Math.incrementExact(falseNegatives);
}
代码示例来源:origin: googlei18n/myanmar-tools
/**
* Adds an edge to the Markov chain of the specified class, increasing the probability of
* transitioning between the given nodes of the given class.
*
* @param i1 The index of the source node to transition from.
* @param i2 The index of the destination node to transition to.
* @param classA true if this transition should be added to class A's chain; false to add this
* transition to class B's chain.
* @return The builder, for chaining.
*/
public BinaryMarkovBuilder addEdge(int i1, int i2, boolean classA) {
int[][] transitionCounts = classA ? transitionCountsA : transitionCountsB;
// transitionCounts[i1][i2]++ with an exception upon integer overflow
transitionCounts[i1][i2] = Math.incrementExact(transitionCounts[i1][i2]);
return this;
}
代码示例来源:origin: stackoverflow.com
a = 2147483647;
a = Math.incrementExact(a);
System.out.println(a);
代码示例来源:origin: org.neo4j/neo4j-kernel
private void registerReadLockAcquired( Object tx, TxLockElement tle )
{
registerLockAcquired( tx, tle );
totalReadCount = Math.incrementExact( totalReadCount );
tle.readCount = Math.incrementExact( tle.readCount );
}
代码示例来源:origin: org.neo4j/neo4j-kernel
private void registerWriteLockAcquired( Object tx, TxLockElement tle )
{
registerLockAcquired( tx, tle );
totalWriteCount = Math.incrementExact( totalWriteCount );
tle.writeCount = Math.incrementExact( tle.writeCount );
}
代码示例来源:origin: com.github.paulcwarren/spring-versions-jpa
private void touch(Object domainObj, Class<? extends Annotation> annotation) {
Field f = BeanUtils.findFieldWithAnnotation(domainObj, annotation);
if (f == null)
return;
Object version = BeanUtils.getFieldWithAnnotation(domainObj, annotation);
if (f.getType().isAssignableFrom(Integer.class)) {
version = Math.incrementExact((Integer)version);
} else if (f.getType().isAssignableFrom(Long.class)) {
version = Math.incrementExact((Long)version);
}
BeanUtils.setFieldWithAnnotation(domainObj, annotation, version);
}
}
代码示例来源:origin: nlpie/biomedicus
@Override
public void doWrite() {
int i = 0;
for (String s : termSet) {
byte[] termBytes = s.getBytes(StandardCharsets.UTF_8);
byte[] indexBytes = ByteBuffer.allocate(4).putInt(i).array();
try {
terms.put(indexBytes, termBytes);
indices.put(termBytes, indexBytes);
} catch (RocksDBException e) {
throw new RuntimeException(e);
}
i = Math.incrementExact(i);
}
}
代码示例来源:origin: org.neo4j/neo4j-kernel
private int incrementActiveClients( int clientState )
{
return getStatus( clientState ) | Math.incrementExact( getActiveClients( clientState ) );
}
内容来源于网络,如有侵权,请联系作者删除!