Tabnine Logo
Arrays.spliterator
Code IndexAdd Tabnine to your IDE (free)

How to use
spliterator
method
in
java.util.Arrays

Best Java code snippets using java.util.Arrays.spliterator (Showing top 20 results out of 315)

origin: google/guava

public void testMap() {
 SpliteratorTester.of(
     () ->
       CollectSpliterators.map(
         Arrays.spliterator(new String[] {"a", "b", "c", "d", "e"}), Ascii::toUpperCase))
   .expect("A", "B", "C", "D", "E");
}
origin: google/guava

public void testFlatMap() {
 SpliteratorTester.of(
     () ->
       CollectSpliterators.flatMap(
         Arrays.spliterator(new String[] {"abc", "", "de", "f", "g", ""}),
         (String str) -> Lists.charactersOf(str).spliterator(),
         Spliterator.SIZED | Spliterator.DISTINCT | Spliterator.NONNULL,
         7))
   .expect('a', 'b', 'c', 'd', 'e', 'f', 'g');
}
origin: net.automatalib/automata-api

@Override
@SuppressWarnings("unchecked")
public Spliterator<I> spliterator() {
  return Arrays.spliterator((I[]) storage, offset, offset + length);
}
origin: net.automatalib/automata-util

/**
 * Retrieves a spliterator for the contents of the given block.
 *
 * @param b
 *         the block
 *
 * @return a spliterator for the contents of the specified block
 */
public Spliterator.OfInt statesInBlockSpliterator(Block b) {
  return Arrays.spliterator(blockData, b.low, b.high);
}
origin: LearnLib/automatalib

/**
 * Retrieves a spliterator for the contents of the given block.
 *
 * @param b
 *         the block
 *
 * @return a spliterator for the contents of the specified block
 */
public Spliterator.OfInt statesInBlockSpliterator(Block b) {
  return Arrays.spliterator(blockData, b.low, b.high);
}
origin: eu.fbk.pikes/pikes-naflib

@Override
public Spliterator<Path> spliterator() {
  return Arrays.spliterator(Corpus.this.files);
}
origin: LearnLib/automatalib

@Override
public Spliterator<I> spliterator() {
  return Arrays.spliterator(storage, offset, offset + length);
}
origin: stackoverflow.com

 static <T> Stream<T> getStream(CompletableFuture<T[]> resp) {
  return StreamSupport.stream(() -> Arrays.spliterator(resp.join()),
    Spliterator.ORDERED|Spliterator.SIZED|Spliterator.SUBSIZED|Spliterator.IMMUTABLE,
    false);
}
origin: org.eclipse.jetty/jetty-http

public Stream<HttpField> stream()
{
  return StreamSupport.stream(Arrays.spliterator(_fields,0,_size),false);
}
origin: jenkinsci/winstone

public Stream<HttpField> stream()
{
  return StreamSupport.stream(Arrays.spliterator(_fields,0,_size),false);
}
origin: hypercube1024/firefly

public Stream<HttpField> stream() {
  return StreamSupport.stream(Arrays.spliterator(_fields, 0, _size), false);
}
origin: one.util/streamex

/**
 * Returns a sequential ordered {@code IntStreamEx} whose elements are the
 * specified values.
 *
 * @param elements the elements of the new stream
 * @return the new stream
 */
public static IntStreamEx of(int... elements) {
  return of(Arrays.spliterator(elements));
}
origin: one.util/streamex

/**
 * Returns a sequential ordered {@code LongStreamEx} whose elements are the
 * specified values.
 *
 * @param elements the elements of the new stream
 * @return the new stream
 */
public static LongStreamEx of(long... elements) {
  return of(Arrays.spliterator(elements));
}
origin: com.atlassian.plugins.test/atlassian-plugins-test

@SuppressWarnings("unchecked")
static Matcher<String> containsAllStrings(final String... substrings) {
  Matcher<String>[] matchers = stream(spliterator(substrings), false)
      .map(org.hamcrest.Matchers::containsString)
      .toArray(Matcher[]::new);
  return allOf(matchers);
}
origin: one.util/streamex

/**
 * Returns a sequential ordered {@code DoubleStreamEx} whose elements are
 * the specified values.
 *
 * @param elements the elements of the new stream
 * @return the new stream
 */
public static DoubleStreamEx of(double... elements) {
  return of(Arrays.spliterator(elements));
}
origin: eu.fbk.pikes/pikes-naflib

@Override
public Spliterator<KAFDocument> spliterator() {
  return spliteratorHelper(Arrays.spliterator(this.files));
}
origin: batfish/batfish

/** Set-theoretic intersection of multiple IpSpaces */
public static @Nullable IpSpace intersection(IpSpace... ipSpaces) {
 return intersection(Arrays.spliterator(ipSpaces));
}
origin: lesfurets/dOOv

@Override
@SuppressWarnings("unchecked")
public Spliterator<Map.Entry<FieldId, Object>> spliterator() {
  Map.Entry<FieldId, Object>[] entries = new Map.Entry[fieldRegistry.runtimeFields().size()];
  for (int i = 0; i < fieldRegistry.runtimeFields().size(); i++) {
    RuntimeField<M, Object> runtimeField = fieldRegistry.runtimeFields().get(i);
    entries[i] = new SupplierEntry<>(runtimeField, model);
  }
  return Arrays.spliterator(entries, 0, entries.length);
}
origin: com.google.guava/guava-tests

public void testMap() {
 SpliteratorTester.of(
     ()
       -> CollectSpliterators.map(
         Arrays.spliterator(new String[] {"a", "b", "c", "d", "e"}), Ascii::toUpperCase))
   .expect("A", "B", "C", "D", "E");
}
origin: com.google.guava/guava-tests

public void testFlatMap() {
 SpliteratorTester.of(
     ()
       -> CollectSpliterators.flatMap(
         Arrays.spliterator(new String[] {"abc", "", "de", "f", "g", ""}),
         (String str) -> Lists.charactersOf(str).spliterator(),
         Spliterator.SIZED | Spliterator.DISTINCT | Spliterator.NONNULL,
         7))
   .expect('a', 'b', 'c', 'd', 'e', 'f', 'g');
}
java.utilArraysspliterator

Popular methods of Arrays

  • asList
    Returns a List of the objects in the specified array. The size of the List cannot be modified, i.e.
  • toString
    Returns a string representation of the contents of the specified array. The string representation co
  • equals
    Returns true if the two specified arrays of booleans areequal to one another. Two arrays are conside
  • sort
    Sorts the specified range of the array into ascending order. The range to be sorted extends from the
  • copyOf
    Copies the specified array, truncating or padding with false (if necessary) so the copy has the spec
  • fill
    Assigns the specified boolean value to each element of the specified array of booleans.
  • stream
  • hashCode
    Returns a hash code based on the contents of the specified array. For any two boolean arrays a and
  • copyOfRange
    Copies the specified range of the specified array into a new array. The initial index of the range (
  • binarySearch
    Searches the specified array of shorts for the specified value using the binary search algorithm. Th
  • deepEquals
    Returns true if the two specified arrays are deeply equal to one another. Unlike the #equals(Object[
  • deepToString
  • deepEquals,
  • deepToString,
  • deepHashCode,
  • setAll,
  • parallelSort,
  • parallelSetAll,
  • checkBinarySearchBounds,
  • checkOffsetAndCount,
  • checkStartAndEnd

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JButton (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • CodeWhisperer 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