Tabnine Logo
Collections.list
Code IndexAdd Tabnine to your IDE (free)

How to use
list
method
in
java.util.Collections

Best Java code snippets using java.util.Collections.list (Showing top 20 results out of 9,414)

Refine searchRefine arrow

  • Vector.addAll
  • Vector.elements
  • Option.<init>
  • Vector.addElement
  • List.add
origin: stackoverflow.com

 List<Logger> loggers = Collections.<Logger>list(LogManager.getCurrentLoggers());
loggers.add(LogManager.getRootLogger());
for ( Logger logger : loggers ) {
  logger.setLevel(Level.OFF);
}
origin: org.apache.ant/ant

for (final String cur : Collections.list(target.getDependencies())) {
  final String m = state.get(cur);
  if (m == null) {
ret.addElement(target);
origin: org.apache.ant/ant

Set<String> toAnalyze = new HashSet<>(Collections.list(getRootClasses()));
Set<String> analyzedDeps = new HashSet<>();
files.addAll(containers);
classes.removeAllElements();
classes.addAll(dependencies);
origin: org.apache.ant/ant

  v.add("#PCDATA");
  v.add(TASKS);
v.addAll(Collections.list(ih.getNestedElements()));
sb.append(String.format("<!ATTLIST %s%n          id ID #IMPLIED", name));
for (final String attrName : Collections.list(ih.getAttributes())) {
  if ("id".equals(attrName)) {
    continue;
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Returns an enumeration describing the available options.
 * 
 * @return an enumeration of all the available options.
 */
@Override
public Enumeration<Option> listOptions() {
 Vector<Option> newVector = new Vector<Option>();
 newVector.addElement(new Option("\tOutput additional statistics.",
  "additional-stats", 0, "-additional-stats"));
 newVector.addAll(Collections.list(super.listOptions()));
 return newVector.elements();
}
origin: elastic/elasticsearch-hadoop

  /** Returns all global scope addresses for interfaces that are up. */
  static InetAddress[] getGlobalInterfaces() throws SocketException {
    List<InetAddress> list = new ArrayList<InetAddress> ();
    for (NetworkInterface intf : getInterfaces()) {
      if (intf.isUp()) {
        for (InetAddress address : Collections.list(intf.getInetAddresses())) {
          if (address.isLoopbackAddress() == false &&
              address.isSiteLocalAddress() == false &&
              address.isLinkLocalAddress() == false) {
            list.add(address);
          }
        }
      }
    }
    return list.toArray(new InetAddress[list.size()]);
  }
}
origin: apache/nifi

  serverConnectors.add(serverConnector);
} else {
  }).filter(Objects::nonNull).flatMap(iface -> Collections.list(iface.getInetAddresses()).stream())
      .map(inetAddress -> {
        final ServerConnector serverConnector = serverConnectorCreator.create(server, configuration);
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Returns an enumeration describing the available options.
 * 
 * @return an enumeration of all the available options.
 */
@Override
public Enumeration<Option> listOptions() {
 Vector<Option> result = new Vector<Option>();
 result.addElement(new Option("\tThe class index\n" + "\t(default: last)",
  "c", 1, "-c <class index>"));
 result.addAll(Collections.list(super.listOptions()));
 return result.elements();
}
origin: org.javassist/javassist

JarClassPath(String pathname) throws NotFoundException {
  JarFile jarfile = null;
  try {
    jarfile = new JarFile(pathname);
    jarfileEntries = new ArrayList<String>();
    for (JarEntry je:Collections.list(jarfile.entries()))
      if (je.getName().endsWith(".class"))
        jarfileEntries.add(je.getName());
    jarfileURL = new File(pathname).getCanonicalFile()
        .toURI().toURL().toString();
    return;
  } catch (IOException e) {}
  finally {
    if (null != jarfile)
      try {
        jarfile.close();
      } catch (IOException e) {}
  }
  throw new NotFoundException(pathname);
}
origin: apache/tika

List<URL> extensionURLs = Collections.list(
    classLoader.getResources(classPrefix+extensionFilePath));
urls.add(coreURL);
urls.addAll(extensionURLs);
        "Specified custom mimetypes file not found: " + customMimesPath);
  URL externalURL = externalFile.toURI().toURL();
  urls.add(externalURL);
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Returns an enumeration describing the available options.
 * 
 * @return an enumeration of all the available options.
 */
@Override
public Enumeration<Option> listOptions() {
 Vector<Option> result = new Vector<Option>();
 result.addElement(new Option("The class index", "c", 1,
  "-c <the class index>"));
 result.addAll(Collections.list(super.listOptions()));
 return result.elements();
}
origin: jooby-project/jooby

private static List<URI> expandPath(final ClassLoader loader, final String pattern) {
 List<URI> result = new ArrayList<>();
 File file = new File(pattern);
 if (file.exists()) {
  result.add(file.toURI());
 }
 Try.run(() -> Collections.list(loader.getResources(pattern))
   .stream()
   .map(it -> Try.apply(it::toURI).get())
   .forEach(result::add));
 return result;
}
origin: com.github.adminfaces/admin-template

/**
 * Load, merge and return all <code>web.xml</code> and <code>web-fragment.xml</code> files found in the classpath
 * into a single {@link Document}.
 */
private static Document loadWebXml(ServletContext context) throws IOException, SAXException {
  List<URL> webXmlURLs = new ArrayList<>();
  webXmlURLs.add(context.getResource(WEB_XML));
  webXmlURLs.addAll(Collections.list(Thread.currentThread().getContextClassLoader().getResources(WEB_FRAGMENT_XML)));
  return createDocument(webXmlURLs);
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Returns an enumeration describing the available options.
 * 
 * @return an enumeration of all the available options.
 */
@Override
public Enumeration<Option> listOptions() {
 Vector<Option> newVector = new Vector<Option>();
 newVector.addElement(new Option("\tSet base of the expansion constant\n"
  + "\t(default = 1.3).", "B", 1, "-B <value>"));
 newVector.addAll(Collections.list(super.listOptions()));
 return newVector.elements();
}
origin: scouter-project/scouter

JarClassPath(String pathname) throws NotFoundException {
  JarFile jarfile = null;
  try {
    jarfile = new JarFile(pathname);
    jarfileEntries = new ArrayList<String>();
    for (JarEntry je:Collections.list(jarfile.entries()))
      if (je.getName().endsWith(".class"))
        jarfileEntries.add(je.getName());
    jarfileURL = new File(pathname).getCanonicalFile()
        .toURI().toURL().toString();
    return;
  } catch (IOException e) {}
  finally {
    if (null != jarfile)
      try {
        jarfile.close();
      } catch (IOException e) {}
  }
  throw new NotFoundException(pathname);
}
origin: omnifaces/omnifaces

/**
 * Load, merge and return all <code>web.xml</code> and <code>web-fragment.xml</code> files found in the classpath
 * into a single {@link Document}.
 */
private static Document loadWebXml(ServletContext context) throws IOException, SAXException {
  List<URL> webXmlURLs = new ArrayList<>();
  webXmlURLs.add(context.getResource(WEB_XML));
  webXmlURLs.addAll(Collections.list(Thread.currentThread().getContextClassLoader().getResources(WEB_FRAGMENT_XML)));
  return createDocument(webXmlURLs);
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Returns an enumeration describing the available options
 * 
 * @return an enumeration of all the available options
 */
@Override
public Enumeration<Option> listOptions() {
 Vector<Option> result = new Vector<Option>();
 result.addElement(new Option("\tThe epsilon for round-off error.\n"
  + "\t(default 1.0e-12)", "P", 1, "-P <double>"));
 result.addAll(Collections.list(super.listOptions()));
 return result.elements();
}
origin: google/j2objc

for (URL resource : Collections.list(resources)) {
  InputStream in = null;
  try {
      String name = stripCommentAndWhitespace(line);
      if (name.length() != 0) {
        result.add(service.cast(loader.loadClass(name).newInstance()));
origin: org.milyn/milyn-commons

  @Override
  protected Enumeration<URL> findResources(String resName) throws IOException {
    List<URL> resources = new ArrayList<URL>();
    URL resource = archive.getEntryURL(resName);

    if (resource != null) {
      resources.add(resource);
    }

    Enumeration<URL> parentResource = getParent().getResources(resName);
    resources.addAll(Collections.list(parentResource));

    return Collections.enumeration(resources);
  }
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Returns an enumeration describing the available options.
 * 
 * @return an enumeration of all the available options.
 */
@Override
public Enumeration<Option> listOptions() {
 Vector<Option> result = new Vector<Option>();
 result.addElement(new Option("\tRandom number seed.\n" + "\t(default "
  + m_SeedDefault + ")", "S", 1, "-S <num>"));
 result.addAll(Collections.list(super.listOptions()));
 return result.elements();
}
java.utilCollectionslist

Javadoc

Returns an ArrayList with all the elements in the enumeration. The elements in the returned ArrayList are in the same order as in the enumeration.

Popular methods of Collections

  • emptyList
    Returns the empty list (immutable). This list is serializable.This example illustrates the type-safe
  • sort
  • singletonList
    Returns an immutable list containing only the specified object. The returned list is serializable.
  • unmodifiableList
    Returns an unmodifiable view of the specified list. This method allows modules to provide users with
  • emptyMap
    Returns the empty map (immutable). This map is serializable.This example illustrates the type-safe w
  • emptySet
    Returns the empty set (immutable). This set is serializable. Unlike the like-named field, this metho
  • unmodifiableMap
    Returns an unmodifiable view of the specified map. This method allows modules to provide users with
  • singleton
    Returns an immutable set containing only the specified object. The returned set is serializable.
  • unmodifiableSet
    Returns an unmodifiable view of the specified set. This method allows modules to provide users with
  • singletonMap
    Returns an immutable map, mapping only the specified key to the specified value. The returned map is
  • addAll
    Adds all of the specified elements to the specified collection. Elements to be added may be specifie
  • reverse
    Reverses the order of the elements in the specified list. This method runs in linear time.
  • addAll,
  • reverse,
  • unmodifiableCollection,
  • shuffle,
  • enumeration,
  • synchronizedMap,
  • synchronizedList,
  • reverseOrder,
  • emptyIterator

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Best IntelliJ plugins
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