List of usage examples for java.util Collections addAll
@SafeVarargs public static <T> boolean addAll(Collection<? super T> c, T... elements)
From source file:capital.scalable.restdocs.constraints.HumanReadableConstraintResolver.java
public HumanReadableConstraintResolver(MethodParameterConstraintResolver delegate) { this.delegate = delegate; this.ignoredFields = new HashSet<>(); Collections.addAll(this.ignoredFields, IGNORED_FIELDS); }
From source file:com.taobao.adfs.database.tdhsocket.client.request.TableInfo.java
public TableInfo(String db, String table, String index, String[] fields) { this._db = db; this._table = table; this._index = index; if (fields != null) { Collections.addAll(this._fields, fields); }//from w w w . j av a 2 s. com this.needField = true; }
From source file:de.tor.tribes.util.bb.OverallReportStatsFormatter.java
@Override public String[] getTemplateVariables() { List<String> vars = new LinkedList<>(); Collections.addAll(vars, new OverallStatResult().getBBVariables()); return vars.toArray(new String[vars.size()]); }
From source file:com.hp.alm.ali.idea.filter.MultipleItemsChooser.java
@Override public void show() { ArrayList<Object> selected = new ArrayList<Object>(); if (value != null) { Collections.addAll(selected, value.split(";")); }/*from w w w . j a va2s. c o m*/ MultipleItemsDialog<Object, ComboItem> chooser = new MultipleItemsDialog<Object, ComboItem>(project, "Select " + title, new MultipleItemsDialogModel<Object, ComboItem>(title, multiple, items, selected, translator)); chooser.setVisible(true); if (chooser.isOk()) { value = StringUtils.join(selected.toArray(), ";"); } }
From source file:com.thoughtworks.go.domain.config.Configuration.java
public Configuration(ConfigurationProperty... configurationProperties) { Collections.addAll(this, configurationProperties); }
From source file:org.sift.batch.tuple.TupleWriter.java
/** * Interface method implementation. Writes the out to the configured {@link OutputCollector} * @see org.springframework.batch.item.ItemWriter#write(java.util.List) *///from w ww.j av a2 s .c om @Override public void write(List<? extends List<Tuple>> tuples) throws Exception { List<Tuple> containedTuples = new LinkedList<Tuple>(); for (List<Tuple> tList : tuples) { for (Tuple t : tList) { if (t.getString(Fields.KEY).equals(Tuple.UNDEFINED_KEY)) { // it is an collection of Tuple instances Collections.addAll(containedTuples, t.getList(Fields.VALUES).toArray(new Tuple[0])); } else { Collections.addAll(containedTuples, t); } } } this.collector.setTuples(containedTuples.toArray(new Tuple[0])); }
From source file:org.bonitasoft.web.designer.utils.TestWebMvcConfigurationSupport.java
@Override protected void configureMessageConverters(List<HttpMessageConverter<?>> converters) { Collections.addAll(converters, createMessageConverters()); }
From source file:com.pavikumbhar.javaheart.util.PasswordGenerator.java
private String generatePassword(int length) { int count = c.length; LinkedList<Character> s = new LinkedList<Character>(); LinkedList<Character> s1 = new LinkedList<Character>(); Collections.addAll(s, c); while (count > 0) { long n = generateRandomNumber(); int position = (int) (n % count); s1.add(s.remove(position));//from w ww.j a va2 s. c om count--; } String pwd = null; //System.out.println(">>"+s1.toString()); Character[] c1 = new Character[s1.size()]; c1 = s1.toArray(c1); String s2 = new String(f1(c1)); //System.out.println(">>"+s2); return RandomStringUtils.random(length, s2); }
From source file:de.hasait.genesis.scriptgen.ScriptGenProcessor.java
@Override public synchronized void init(final ProcessingEnvironment pProcessingEnv) { super.init(pProcessingEnv); _locations.add("genesis"); final String rawLocations = processingEnv.getOptions().get(OPTION___LOCATIONS); if (rawLocations != null) { Collections.addAll(_locations, rawLocations.split(SCRIPT_LOCATIONS_SPLIT)); }// w w w .j ava 2 s .co m registerGenerator(ScriptGen.class, this::processScriptGen); }
From source file:com.dastardlylabs.ti.ocrdroid.OcrdroidModule.java
private static boolean tessDataExists() { ArrayList<String> dataFiles = new ArrayList<String>(); Collections.addAll(dataFiles, getTessDataDirectory().list()); JSONArray fred = new JSONArray(dataFiles); Log.d(LCAT, "DataFiles list: " + fred.toString()); return dataFiles.contains((Object) "tessdata"); }