congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IntConsumer
Code IndexAdd Tabnine to your IDE (free)

How to use
IntConsumer
in
java.util.function

Best Java code snippets using java.util.function.IntConsumer (Showing top 20 results out of 918)

Refine searchRefine arrow

  • ConcurrentModificationException
origin: google/guava

/** Invokes {@code consumer} for each value contained in this array, in order. */
public void forEach(IntConsumer consumer) {
 checkNotNull(consumer);
 for (int i = start; i < end; i++) {
  consumer.accept(array[i]);
 }
}
origin: com.koloboke/koloboke-impl-jdk8

@Override
public void forEachRemaining(IntConsumer action) {
  if (action == null)
    throw new java.lang.NullPointerException();
  long[] keys = this.keys;
  int[] vals = this.vals;
  int nextI = nextIndex;
  for (int i = nextI; i >= 0; i--) {
    if (keys[i] < FREE_BITS) {
      action.accept(vals[i]);
    }
  }
  if (nextI != nextIndex) {
    throw new java.util.ConcurrentModificationException();
  }
  nextIndex = -1;
}
origin: pholser/junit-quickcheck

  @Property public void chained(IntConsumer first, IntConsumer second, int arg) {
    first.andThen(second).accept(arg);
  }
}
origin: stackoverflow.com

 public static IntConsumer every(int count, IntConsumer consumer) {
  if (count <= 0)
    throw new IllegalArgumentException("Count must be >1: Got " + count);
  return new IntConsumer() {
    private int i;
    @Override
    public void accept(int value) {
      if (++this.i == count) {
        consumer.accept(value);
        this.i = 0;
      }
    }
  };
}
origin: loldevs/riotapi

public void addOnKeyframePulled(IntConsumer consumer) {
  this.onKeyframePulled = onKeyframePulled == null ? consumer : onKeyframePulled.andThen(consumer);
}
origin: net.openhft/koloboke-impl-jdk8

@Override
public void forEachRemaining(IntConsumer action) {
  if (action == null)
    throw new java.lang.NullPointerException();
  long[] tab = this.tab;
  long entry;
  int nextI = nextIndex;
  for (int i = nextI; i >= 0; i--) {
    if ((int) (entry = tab[i]) < FREE_BITS) {
      action.accept((int) (entry >>> 32));
    }
  }
  if (nextI != nextIndex) {
    throw new java.util.ConcurrentModificationException();
  }
  nextIndex = -1;
}
origin: loldevs/riotapi

public void addOnChunkFailed(IntConsumer consumer) {
  this.onChunkFailed = onChunkFailed == null ? consumer : onChunkFailed.andThen(consumer);
}
origin: com.koloboke/koloboke-impl-jdk8

@Override
public void forEachRemaining(IntConsumer action) {
  if (action == null)
    throw new java.lang.NullPointerException();
  long[] tab = this.tab;
  long entry;
  int nextI = nextIndex;
  for (int i = nextI; i >= 0; i--) {
    if ((int) (entry = tab[i]) < FREE_BITS) {
      action.accept((int) (entry >>> 32));
    }
  }
  if (nextI != nextIndex) {
    throw new java.util.ConcurrentModificationException();
  }
  nextIndex = -1;
}
origin: prestodb/presto

public void setPartitionedSplitCount(int partitionedSplitCount)
{
  splitSetter.accept(partitionedSplitCount);
}
origin: loldevs/riotapi

public void addOnChunkPulled(IntConsumer consumer) {
  this.onChunkPulled = onChunkPulled == null ? consumer : onChunkPulled.andThen(consumer);
}
origin: com.koloboke/koloboke-impl-jdk8

@Override
public void forEachRemaining(IntConsumer action) {
  if (action == null)
    throw new java.lang.NullPointerException();
  long[] tab = this.tab;
  long entry;
  int nextI = nextIndex;
  for (int i = nextI; i >= 0; i--) {
    if ((int) (entry = tab[i]) < FREE_BITS) {
      action.accept((int) (entry >>> 32));
    }
  }
  if (nextI != nextIndex) {
    throw new java.util.ConcurrentModificationException();
  }
  nextIndex = -1;
}
origin: konsoletyper/teavm

public void ifPresent(IntConsumer consumer) {
  if (this != emptyInstance) {
    consumer.accept(value);
  }
}
origin: loldevs/riotapi

public void addOnKeyframeFailed(IntConsumer consumer) {
  this.onKeyframeFailed = onKeyframeFailed == null ? consumer : onKeyframeFailed.andThen(consumer);
}
origin: com.koloboke/koloboke-impl-jdk8

@Override
public void forEachRemaining(IntConsumer action) {
  if (action == null)
    throw new java.lang.NullPointerException();
  long[] keys = this.keys;
  int[] vals = this.vals;
  int nextI = nextIndex;
  for (int i = nextI; i >= 0; i--) {
    if (keys[i] < FREE_BITS) {
      action.accept(vals[i]);
    }
  }
  if (nextI != nextIndex) {
    throw new java.util.ConcurrentModificationException();
  }
  nextIndex = -1;
}
origin: wildfly/wildfly

/** Invokes {@code consumer} for each value contained in this array, in order. */
public void forEach(IntConsumer consumer) {
 checkNotNull(consumer);
 for (int i = start; i < end; i++) {
  consumer.accept(array[i]);
 }
}
origin: net.openhft/koloboke-impl-jdk8

@Override
public void forEachRemaining(IntConsumer action) {
  if (action == null)
    throw new java.lang.NullPointerException();
  long[] tab = this.tab;
  long entry;
  int nextI = nextIndex;
  for (int i = nextI; i >= 0; i--) {
    if ((int) (entry = tab[i]) < FREE_BITS) {
      action.accept((int) (entry >>> 32));
    }
  }
  if (nextI != nextIndex) {
    throw new java.util.ConcurrentModificationException();
  }
  nextIndex = -1;
}
origin: speedment/speedment

@Override
public void forEachOrdered(IntConsumer action) {
  requireNonNull(action);
  action.accept(element);
}
origin: net.openhft/koloboke-impl-jdk8

@Override
public void forEachRemaining(IntConsumer action) {
  if (action == null)
    throw new java.lang.NullPointerException();
  long[] keys = this.keys;
  int[] vals = this.vals;
  int nextI = nextIndex;
  for (int i = nextI; i >= 0; i--) {
    if (keys[i] < FREE_BITS) {
      action.accept(vals[i]);
    }
  }
  if (nextI != nextIndex) {
    throw new java.util.ConcurrentModificationException();
  }
  nextIndex = -1;
}
origin: speedment/speedment

@Override
public void forEach(IntConsumer action) {
  requireNonNull(action);
  action.accept(element);
}
origin: net.openhft/koloboke-impl-jdk8

@Override
public void forEachRemaining(IntConsumer action) {
  if (action == null)
    throw new java.lang.NullPointerException();
  long[] keys = this.keys;
  int[] vals = this.vals;
  int nextI = nextIndex;
  for (int i = nextI; i >= 0; i--) {
    if (keys[i] < FREE_BITS) {
      action.accept(vals[i]);
    }
  }
  if (nextI != nextIndex) {
    throw new java.util.ConcurrentModificationException();
  }
  nextIndex = -1;
}
java.util.functionIntConsumer

Javadoc

Represents an operation that accepts a single int-valued argument and returns no result. This is the primitive type specialization of Consumer for int. Unlike most other functional interfaces, IntConsumer is expected to operate via side-effects.

This is a functional interface whose functional method is #accept(int).

Most used methods

  • accept
  • andThen
  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now