Codota Logo
IntConsumer
Code IndexAdd Codota 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
  • Common ways to obtain IntConsumer
private void myMethod () {
IntConsumer i =
  • Codota IconCheckedIntConsumer checkedIntConsumer;checkedIntConsumer.accept(value)
  • Smart code suggestions by Codota
}
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

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now