Tabnine Logo
ArrayList.addAll
Code IndexAdd Tabnine to your IDE (free)

How to use
addAll
method
in
java.util.ArrayList

Best Java code snippets using java.util.ArrayList.addAll (Showing top 20 results out of 31,356)

Refine searchRefine arrow

  • ArrayList.add
  • ArrayList.size
  • ArrayList.<init>
  • Arrays.asList
  • ArrayList.get
  • ArrayList.toArray
origin: libgdx/libgdx

private ArrayList<JavaSegment> sortMethodsAndSections (ArrayList<JavaMethod> methods, ArrayList<JniSection> sections) {
  ArrayList<JavaSegment> segments = new ArrayList<JavaSegment>();
  segments.addAll(methods);
  segments.addAll(sections);
  Collections.sort(segments, new Comparator<JavaSegment>() {
    @Override
    public int compare (JavaSegment o1, JavaSegment o2) {
      return o1.getStartIndex() - o2.getStartIndex();
    }
  });
  return segments;
}
origin: ReactiveX/RxJava

@Override
public boolean addAll(Collection<? extends T> c) {
  boolean b = list.addAll(c);
  lazySet(list.size());
  return b;
}
origin: hibernate/hibernate-orm

public StandardSQLExceptionConverter(SQLExceptionConversionDelegate... delegates) {
  if ( delegates != null ) {
    this.delegates.addAll( Arrays.asList( delegates ) );
  }
}
origin: commons-collections/commons-collections

/**
 * Add these Collections to the list of collections in this composite
 *
 * @param comps Collections to be appended to the composite
 */
public void addComposited(Collection[] comps) {
  ArrayList list = new ArrayList(Arrays.asList(this.all));
  list.addAll(Arrays.asList(comps));
  all = (Collection[]) list.toArray(new Collection[list.size()]);
}

origin: google/j2objc

private List<Class<?>> categories(Description description) {
  ArrayList<Class<?>> categories = new ArrayList<Class<?>>();
  categories.addAll(Arrays.asList(directCategories(description)));
  categories.addAll(Arrays.asList(directCategories(parentDescription(description))));
  return categories;
}
origin: codecentric/spring-boot-admin

private List<InstanceEvent> appendToEvents(InstanceEvent event, boolean isNewEvent) {
  if (!isNewEvent) {
    return this.unsavedEvents;
  }
  ArrayList<InstanceEvent> events = new ArrayList<>(this.unsavedEvents.size() + 1);
  events.addAll(this.unsavedEvents);
  events.add(event);
  return events;
}
origin: libgdx/libgdx

process(files, outputRoot, outputRoot, dirToEntries, 0);
ArrayList<Entry> allEntries = new ArrayList();
for (java.util.Map.Entry<File, ArrayList<Entry>> mapEntry : dirToEntries.entrySet()) {
  ArrayList<Entry> dirEntries = mapEntry.getValue();
    newOutputDir = outputRoot;
  else if (!dirEntries.isEmpty()) //
    newOutputDir = dirEntries.get(0).outputDir;
  String outputName = inputDir.getName();
  if (outputSuffix != null) outputName = outputName.replaceAll("(.*)\\..*", "$1") + outputSuffix;
    throw new Exception("Error processing directory: " + entry.inputFile.getAbsolutePath(), ex);
  allEntries.addAll(dirEntries);
origin: commonsguy/cw-omnibus

public KeyframeSet(Keyframe... keyframes) {
  mNumKeyframes = keyframes.length;
  mKeyframes = new ArrayList<Keyframe>();
  mKeyframes.addAll(Arrays.asList(keyframes));
  mFirstKeyframe = mKeyframes.get(0);
  mLastKeyframe = mKeyframes.get(mNumKeyframes - 1);
  mInterpolator = mLastKeyframe.getInterpolator();
}
origin: jMonkeyEngine/jmonkeyengine

public void attachTo(boolean overrideMainFramebuffer, ViewPort... vps) {
  if (viewPorts.size() > 0) {
    for (ViewPort vp : viewPorts) {
      vp.setOutputFrameBuffer(null);
    }
    viewPorts.get(viewPorts.size() - 1).removeProcessor(this);
  }
  viewPorts.addAll(Arrays.asList(vps));
  viewPorts.get(viewPorts.size() - 1).addProcessor(this);
  this.attachAsMain = overrideMainFramebuffer;
}
origin: runelite/runelite

private void updateList(ArrayList<String> list, String input)
{
  list.clear();
  if (list == rotationWhitelist)
  {
    Matcher m = ROTATION_REGEX.matcher(input);
    while (m.find())
    {
      String rotation = m.group(1).toLowerCase();
      if (!list.contains(rotation))
      {
        list.add(rotation);
      }
    }
  }
  else
  {
    list.addAll(Arrays.asList(input.toLowerCase().split(SPLIT_REGEX)));
  }
}
origin: prestodb/presto

  public static <T> Collector<T, ?, Object[][]> toDataProvider()
  {
    return Collector.of(
        ArrayList::new,
        (builder, entry) -> builder.add(new Object[] {entry}),
        (left, right) -> {
          left.addAll(right);
          return left;
        },
        builder -> builder.toArray(new Object[][] {}));
  }
}
origin: apache/storm

public ResultRecord(ResultRecord lhs, Tuple rhs, boolean generateOutputFields) {
  if (lhs != null) {
    tupleList.addAll(lhs.tupleList);
  }
  if (rhs != null) {
    tupleList.add(rhs);
  }
  if (generateOutputFields) {
    outFields = doProjection(tupleList, outputFields);
  }
}
origin: protostuff/protostuff

void addAnnotationsTo(Field<?> target, String enclosingNamespace)
{
  if (target.addAnnotations(annotations, true))
  {
    if (refOffset != references.size())
    {
      int size = references.size();
      while (refOffset < size)
        references.get(refOffset++).enclosingNamespace = enclosingNamespace;
    }
  }
  
  if (!docs.isEmpty())
  {
    target.docs.addAll(docs);
    docs.clear();
  }
}
origin: go-lang-plugin-org/go-lang-idea-plugin

 @NotNull
 @Override
 public AnAction[] getChildren(@Nullable AnActionEvent e) {
  if (e == null) {
   return AnAction.EMPTY_ARRAY;
  }
  Project project = e.getProject();
  Editor editor = e.getData(CommonDataKeys.EDITOR);
  if (project == null || editor == null) return AnAction.EMPTY_ARRAY;
  PsiFile file = PsiUtilBase.getPsiFileInEditor(editor, project);

  ArrayList<AnAction> children = ContainerUtil.newArrayList();
  for (GoTestFramework framework : GoTestFramework.all()) {
   if (framework.isAvailableOnFile(file)) {
    children.addAll(framework.getGenerateMethodActions());
   }
  }
  return !children.isEmpty() ? children.toArray(new AnAction[children.size()]) : AnAction.EMPTY_ARRAY;
 }
}
origin: commons-collections/commons-collections

/**
 * Removes a collection from the those being decorated in this composite.
 *
 * @param coll  collection to be removed
 */
public void removeComposited(Collection coll) {
  ArrayList list = new ArrayList(this.all.length);
  list.addAll(Arrays.asList(this.all));
  list.remove(coll);
  this.all = (Collection[]) list.toArray(new Collection[list.size()]);
}

origin: commons-collections/commons-collections

public Collection makeConfirmedFullCollection() {
  ArrayList list = new ArrayList();
  list.addAll(Arrays.asList(getFullElements()));
  return list;
}
origin: Tencent/tinker

private void getCompressMethodFromApk() {
  ZipFile zipFile = null;
  try {
    zipFile = new ZipFile(config.mNewApkFile);
    ArrayList<String> sets = new ArrayList<>();
    sets.addAll(modifiedSet);
    sets.addAll(addedSet);
    ZipEntry zipEntry;
    for (String name : sets) {
      zipEntry = zipFile.getEntry(name);
      if (zipEntry != null && zipEntry.getMethod() == ZipEntry.STORED) {
        storedSet.add(name);
      }
    }
  } catch (Throwable throwable) {
  } finally {
    if (zipFile != null) {
      try {
        zipFile.close();
      } catch (IOException e) {
      }
    }
  }
}
origin: libgdx/libgdx

private ArrayList<JavaSegment> sortMethodsAndSections (ArrayList<JavaMethod> methods, ArrayList<JniSection> sections) {
  ArrayList<JavaSegment> segments = new ArrayList<JavaSegment>();
  segments.addAll(methods);
  segments.addAll(sections);
  Collections.sort(segments, new Comparator<JavaSegment>() {
    @Override
    public int compare (JavaSegment o1, JavaSegment o2) {
      return o1.getStartIndex() - o2.getStartIndex();
    }
  });
  return segments;
}
origin: libgdx/libgdx

process(files, outputRoot, outputRoot, dirToEntries, 0);
ArrayList<Entry> allEntries = new ArrayList();
for (java.util.Map.Entry<File, ArrayList<Entry>> mapEntry : dirToEntries.entrySet()) {
  ArrayList<Entry> dirEntries = mapEntry.getValue();
    newOutputDir = outputRoot;
  else if (!dirEntries.isEmpty()) //
    newOutputDir = dirEntries.get(0).outputDir;
  String outputName = inputDir.getName();
  if (outputSuffix != null) outputName = outputName.replaceAll("(.*)\\..*", "$1") + outputSuffix;
    throw new Exception("Error processing directory: " + entry.inputFile.getAbsolutePath(), ex);
  allEntries.addAll(dirEntries);
origin: hibernate/hibernate-orm

@Override
public MetadataBuilder applySourceProcessOrdering(MetadataSourceType... sourceTypes) {
  options.sourceProcessOrdering.addAll( Arrays.asList( sourceTypes ) );
  return this;
}
java.utilArrayListaddAll

Javadoc

Inserts the objects in the specified collection at the specified location in this List. The objects are added in the order they are returned from the collection's iterator.

Popular methods of ArrayList

  • <init>
  • add
  • size
    Returns the number of elements in this ArrayList.
  • get
    Returns the element at the specified position in this list.
  • toArray
    Returns an array containing all of the elements in this list in proper sequence (from first to last
  • remove
    Removes the first occurrence of the specified element from this list, if it is present. If the list
  • clear
    Removes all elements from this ArrayList, leaving it empty.
  • isEmpty
    Returns true if this list contains no elements.
  • iterator
    Returns an iterator over the elements in this list in proper sequence.The returned iterator is fail-
  • contains
    Searches this ArrayList for the specified object.
  • set
    Replaces the element at the specified position in this list with the specified element.
  • indexOf
    Returns the index of the first occurrence of the specified element in this list, or -1 if this list
  • set,
  • indexOf,
  • clone,
  • subList,
  • stream,
  • ensureCapacity,
  • trimToSize,
  • removeAll,
  • toString

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top plugins for WebStorm
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