public CompositeJiraHomePathLocator(final JiraHomePathLocator... locators) { this.locators = CollectionBuilder.newBuilder(locators).asList(); }
public String getText(final String key, final String value1, final String value2, final String value3, final String value4, final String value5, final String value6, final String value7) { return getText(key, CollectionBuilder.list(value1, value2, value3, value4, value5, value6, value7)); }
public EvaluateAllPredicate(Predicate<T> first, Predicate<T>... predicates) { this.predicates = CollectionBuilder.newBuilder(first).addAll(Arrays.<Predicate<T>>asList(predicates)).asList(); }
void createSharedHomeDirectories(final File sharedJiraHome) throws JiraHomeException { Set<String> subdirs = CollectionBuilder.<String>newBuilder() .add(AttachmentPathManager.ATTACHMENTS_DIR) .add(PluginPath.PLUGINS_DIRECTORY) .add(PluginPath.BUNDLED_SUBDIR) .add(PluginPath.OSGI_SUBDIR) .add(FileService.MAIL_DIR) .addAll(JiraHome.sharedsubdirs) .asMutableSortedSet(); createHomeDirectories(sharedJiraHome, subdirs); }
final CollectionBuilder<PluginLoader> pluginLoaderBuilder = CollectionBuilder.newBuilder(); pluginLoaderBuilder.addAll(pluginFactoryAndLoaderRegistrar.getBootstrapSystemPluginLoaders()); pluginLoaderBuilder.add(pluginFactoryAndLoaderRegistrar.getBundledPluginsLoader(pluginFactories)); pluginLoaderBuilder.add(pluginFactoryAndLoaderRegistrar.getDirectoryPluginLoader(pluginFactories)); return pluginLoaderBuilder.asList();
/** * @return only the chunks that would have been present in the original text i.e. no Added Chunks */ public List<DiffChunk> getOriginalChunks() { return getFilteredList(chunks, CollectionBuilder.newBuilder(DiffType.ADDED_WORDS, DiffType.ADDED_CHARACTERS, DiffType.ADDED_LINES).asSet()); }
static List<FieldIndexer> indexers(final Class<? extends FieldIndexer>... indexers) { final CollectionBuilder<FieldIndexer> builder = CollectionBuilder.newBuilder(); for (final Class<? extends FieldIndexer> clazz : indexers) { builder.add(loadComponent(clazz)); } return builder.asList(); }
public Resolver(final Collection<String> unsupportedTypes, final Function<String, Function<String, String>> fieldTypeResolver) { this.unsupportedTypes = CollectionBuilder.<String> newBuilder().addAll(unsupportedTypes).asSet(); this.fieldTypeResolver = notNull("fieldTypeResolver", fieldTypeResolver); }
public void store(final DataPoint dataPoint) { final List<DataPoint> keyPoints = points.get(dataPoint.getKey()); if (keyPoints == null) { points.put(dataPoint.getKey(), CollectionBuilder.<DataPoint> newBuilder().add(dataPoint).asArrayList()); } else { keyPoints.add(dataPoint); } }
private Set<ProjectIssueTypeContext> getContextsForProjects(final Collection<Project> projects) { CollectionBuilder<ProjectIssueTypeContext> builder = CollectionBuilder.newBuilder(); for (Project project : projects) { builder.add(new ProjectIssueTypeContextImpl(new ProjectContextImpl(project.getId()), AllIssueTypesContext.INSTANCE)); } return builder.asMutableSet(); }
public JiraModuleFactory(final HostContainer jiraHostContainer) { super(CollectionBuilder.<PrefixModuleFactory>newBuilder() .add(new ClassPrefixModuleFactory(jiraHostContainer)) .add(new BeanPrefixModuleFactory()) .asSet()); } }
tabs = CollectionBuilder.newBuilder(FilterViewTabs.POPULAR, FilterViewTabs.SEARCH).asMutableList(); defaultTab = FilterViewTabs.POPULAR; tabs = CollectionBuilder.newBuilder(FilterViewTabs.FAVOURITES, FilterViewTabs.POPULAR, FilterViewTabs.SEARCH).asMutableList(); defaultTab = FilterViewTabs.FAVOURITES;
protected Clause getClauseFromParams(final ApplicationUser user, CustomFieldParams params) { Collection<String> searchValues = params.getValuesForNullKey(); // Remove the "all" flag from the input searchValues.removeAll(CollectionBuilder.newBuilder("-1", "").asCollection()); if (!searchValues.isEmpty()) { return new TerminalClauseImpl(getClauseName(user, clauseNames), searchValues.toArray(new String[searchValues.size()])); } return null; }
public String getViewHtml(final FieldLayoutItem fieldLayoutItem, final Action action, final Issue issue, final Object value, final Map displayParameters) { final Map<String, Object> velocityParameters = getVelocityParams(fieldLayoutItem, action, issue, displayParameters); velocityParameters.put("canEdit", Boolean.FALSE); Set<Label> labels = (value instanceof Set ? (Set<Label>)value : CollectionBuilder.<Label>newBuilder(new Label(null, issue.getId(), (String)value)).asHashSet() ); velocityParameters.put("labels", labels); velocityParameters.put("fieldId", "label"); velocityParameters.put("i18n", authenticationContext.getI18nHelper()); velocityParameters.put("labelUtil", getLabelUtil()); return renderTemplate("labels-view.vm", velocityParameters); }
public Collection<T> asCollection() { return asList(); }
public Collection<T> asMutableCollection() { return asMutableList(); }
public List<T> asMutableList() { return asArrayList(); }
public Set<T> asMutableSet() { return asHashSet(); }
final CollectionBuilder<PluginLoader> pluginLoaderBuilder = CollectionBuilder.newBuilder(); pluginLoaderBuilder.addAll(pluginFactoryAndLoaderRegistrar.getDefaultSystemPluginLoaders()); pluginLoaderBuilder.add(new ClassPathPluginLoader()); pluginLoaderBuilder.add(pluginFactoryAndLoaderRegistrar.getBundledPluginsLoader(pluginFactories)); if (pluginLoader != null) pluginLoaderBuilder.add(pluginLoader); if (pluginLoader != null) pluginLoaderBuilder.add(pluginLoader); pluginLoaderBuilder.add(pluginFactoryAndLoaderRegistrar.getDirectoryPluginLoader(pluginFactories)); return pluginLoaderBuilder.asList();
/** * @return only the chunks that are present in the revised text i.e. no Deleted Chunks */ public List<DiffChunk> getRevisedChunks() { return getFilteredList(chunks, CollectionBuilder.newBuilder(DiffType.DELETED_WORDS, DiffType.DELETED_CHARACTERS, DiffType.DELETED_LINES).asSet()); }