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

How to use
fill
method
in
java.util.Collections

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

origin: stackoverflow.com

 List<Boolean> list=new ArrayList<Boolean>(Arrays.asList(new Boolean[10]));
Collections.fill(list, Boolean.TRUE);
origin: bumptech/glide

@NonNull
@Override
public List<Object> getPreloadItems(int position) {
 ArrayList<Object> result = new ArrayList<>(1);
 Collections.fill(result, new Object());
 return result;
}
origin: forcedotcom/phoenix

@Override
public void clearParameters() throws SQLException {
  Collections.fill(parameters, BindManager.UNBOUND_PARAMETER);
}
origin: apache/phoenix

@Override
public void clearParameters() throws SQLException {
  Collections.fill(parameters, BindManager.UNBOUND_PARAMETER);
}
origin: org.apache.lucene/lucene-core

@SuppressWarnings("try")
private synchronized void closeMergeReaders(MergePolicy.OneMerge merge, boolean suppressExceptions) throws IOException {
 final boolean drop = suppressExceptions == false;
 try (Closeable finalizer = merge::mergeFinished) {
  IOUtils.applyToAll(merge.readers, sr -> {
   final ReadersAndUpdates rld = getPooledInstance(sr.getOriginalSegmentInfo(), false);
   // We still hold a ref so it should not have been removed:
   assert rld != null;
   if (drop) {
    rld.dropChanges();
   } else {
    rld.dropMergingUpdates();
   }
   rld.release(sr);
   release(rld);
   if (drop) {
    readerPool.drop(rld.info);
   }
  });
 } finally {
  Collections.fill(merge.readers, null);
 }
}
origin: konsoletyper/teavm

Collections.fill(definedVersions, null);
Task task = stack.pop();
origin: forcedotcom/phoenix

public PhoenixPreparedStatement(PhoenixConnection connection, String query) throws SQLException {
  super(connection);
  this.query = query;
  this.statement = parseStatement(query);
  this.parameters = Arrays.asList(new Object[statement.getBindCount()]);
  Collections.fill(parameters, BindManager.UNBOUND_PARAMETER);
}
origin: forcedotcom/phoenix

public PhoenixPreparedStatement(PhoenixConnection connection, PhoenixStatementParser parser) throws SQLException,
    IOException {
  super(connection);
  this.statement = parser.nextStatement(new ExecutableNodeFactory());
  if (this.statement == null) { throw new EOFException(); }
  this.query = null; // TODO: add toString on SQLStatement
  this.parameters = Arrays.asList(new Object[statement.getBindCount()]);
  Collections.fill(parameters, BindManager.UNBOUND_PARAMETER);
}
origin: apache/phoenix

public PhoenixPreparedStatement(PhoenixConnection connection, String query) throws SQLException {
  super(connection);
  this.query = query;
  this.statement = parseStatement(query);
  this.parameterCount = statement.getBindCount();
  this.parameters = Arrays.asList(new Object[statement.getBindCount()]);
  Collections.fill(parameters, BindManager.UNBOUND_PARAMETER);
}
origin: apache/phoenix

public PhoenixPreparedStatement(PhoenixConnection connection, PhoenixStatementParser parser) throws SQLException, IOException {
  super(connection);
  this.statement = parser.nextStatement(new ExecutableNodeFactory());
  if (this.statement == null) { throw new EOFException(); }
  this.query = null; // TODO: add toString on SQLStatement
  this.parameterCount = statement.getBindCount();
  this.parameters = Arrays.asList(new Object[statement.getBindCount()]);
  Collections.fill(parameters, BindManager.UNBOUND_PARAMETER);
}

origin: stackoverflow.com

public void changeValues(int x){   
 int length = arrayList.size();
 Collections.fill(arrayList, Boolean.TRUE);
 for(int a = 0; a < length; a += x){
   arrayList.set(a, Boolean.FALSE);
 }
 System.out.print(arrayList);
}
origin: com.google.javascript/closure-compiler

private void reset() {
 isLooseMatch = false;
 Collections.fill(localVarMatches, null);
 for (int i = 0; i < paramNodeMatches.size(); i++) {
  this.paramNodeMatches.set(i, null);
 }
}
origin: BruceEckel/OnJava8-Examples

 public static void main(String[] args) {
  List<StringAddress> list = new ArrayList<>(
   Collections.nCopies(4,
    new StringAddress("Hello")));
  System.out.println(list);
  Collections.fill(list,
   new StringAddress("World!"));
  System.out.println(list);
 }
}
origin: stackoverflow.com

 // apparently this is broken. Whoops for me!
java.util.Collections.fill(list,new Integer(0));

// this is better
Integer[] data = new Integer[60];
Arrays.fill(data,new Integer(0));
List<Integer> list = Arrays.asList(data);
origin: org.fudaa.framework.ctulu/ctulu-common

public final boolean setAll(final Object _v) {
 if (_v instanceof Boolean) {
  Collections.fill(list_, _v);
  fireObjectChanged();
  return true;
 }
 return false;
}
origin: com.github.steveash.kylm/kylm

@Override
public void setChildren(Vector<NgramNode> newChildren) {
  if (parent == null) {
    Collections.fill(children, null);
    for (NgramNode child : newChildren)
      children.set(child.getId(), child);
  } else
    children = new Vector<NgramNode>(newChildren);
  childCount = newChildren.size();
}
origin: org.apache.phoenix/phoenix-core

public PhoenixPreparedStatement(PhoenixConnection connection, String query) throws SQLException {
  super(connection);
  this.query = query;
  this.statement = parseStatement(query);
  this.parameterCount = statement.getBindCount();
  this.parameters = Arrays.asList(new Object[statement.getBindCount()]);
  Collections.fill(parameters, BindManager.UNBOUND_PARAMETER);
}
origin: com.aliyun.phoenix/ali-phoenix-core

public PhoenixPreparedStatement(PhoenixConnection connection, String query) throws SQLException {
  super(connection);
  this.query = query;
  this.statement = parseStatement(query);
  this.parameterCount = statement.getBindCount();
  this.parameters = Arrays.asList(new Object[statement.getBindCount()]);
  Collections.fill(parameters, BindManager.UNBOUND_PARAMETER);
}
origin: org.apache.phoenix/phoenix-core

public PhoenixPreparedStatement(PhoenixConnection connection, PhoenixStatementParser parser) throws SQLException, IOException {
  super(connection);
  this.statement = parser.nextStatement(new ExecutableNodeFactory());
  if (this.statement == null) { throw new EOFException(); }
  this.query = null; // TODO: add toString on SQLStatement
  this.parameterCount = statement.getBindCount();
  this.parameters = Arrays.asList(new Object[statement.getBindCount()]);
  Collections.fill(parameters, BindManager.UNBOUND_PARAMETER);
}

origin: com.aliyun.phoenix/ali-phoenix-core

public PhoenixPreparedStatement(PhoenixConnection connection, PhoenixStatementParser parser) throws SQLException, IOException {
  super(connection);
  this.statement = parser.nextStatement(new ExecutableNodeFactory());
  if (this.statement == null) { throw new EOFException(); }
  this.query = null; // TODO: add toString on SQLStatement
  this.parameterCount = statement.getBindCount();
  this.parameters = Arrays.asList(new Object[statement.getBindCount()]);
  Collections.fill(parameters, BindManager.UNBOUND_PARAMETER);
}

java.utilCollectionsfill

Javadoc

Fills the specified list with the specified element.

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,
  • list,
  • 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