congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
CollectionUtil.copyAsImmutableList
Code IndexAdd Tabnine to your IDE (free)

How to use
copyAsImmutableList
method
in
com.atlassian.jira.util.collect.CollectionUtil

Best Java code snippets using com.atlassian.jira.util.collect.CollectionUtil.copyAsImmutableList (Showing top 19 results out of 315)

origin: com.atlassian.jira/jira-core

/**
 * @return all the chunks in a single list
 */
public List<DiffChunk> getUnifiedChunks()
{
  return CollectionUtil.copyAsImmutableList(chunks);
}
origin: com.atlassian.jira/jira-ui-test-utils

CompositeTimedTestListener(final Collection<? extends TimedTestListener> listeners) 
{
  this.listeners = CollectionUtil.copyAsImmutableList(listeners);
}
origin: com.atlassian.jira/jira-core

Map<String, List<ClauseHandler>> createHandlerIndex()
{
  final Map<String, List<ClauseHandler>> tmpHandlerIndex = new HashMap<String, List<ClauseHandler>>();
  for (final Map.Entry<String, Set<ClauseHandler>> entry : handlerIndex.entrySet())
  {
    tmpHandlerIndex.put(entry.getKey(), copyAsImmutableList(entry.getValue()));
  }
  return Collections.unmodifiableMap(tmpHandlerIndex);
}
origin: com.atlassian.jira/jira-core

Map<String, List<SearchHandler.SearcherRegistration>> createSearcherJqlNameIndex()
{
  final HashMap<String, List<SearchHandler.SearcherRegistration>> tmpHandlerIndex = new HashMap<String, List<SearchHandler.SearcherRegistration>>();
  for (final Map.Entry<String, Set<SearchHandler.SearcherRegistration>> entry : searcherClauseNameIndex.entrySet())
  {
    tmpHandlerIndex.put(entry.getKey(), copyAsImmutableList(entry.getValue()));
  }
  return Collections.unmodifiableMap(tmpHandlerIndex);
}
origin: com.atlassian.jira/jira-api

public OrderByImpl(final Collection<SearchSort> searchSorts)
{
  this.searchSorts = CollectionUtil.copyAsImmutableList(containsNoNulls("searchSorts", searchSorts));
}
origin: com.atlassian.jira/jira-api

/**
 * Create a new handler.
 *
 * @param fieldIndexers the indexers to associate with the handler. May not be null.
 * @param searcherRegistration the registration to associate with the handler. May be null.
 * @param clauseRegistrations the JQL clauses to associate with the chanler. May not be null.
 */
public SearchHandler(final List<FieldIndexer> fieldIndexers, final SearcherRegistration searcherRegistration,
    final List<ClauseRegistration> clauseRegistrations)
{
  this.clauseRegistrations = CollectionUtil.copyAsImmutableList(containsNoNulls("clauseRegistrations", clauseRegistrations));
  this.fieldIndexers = CollectionUtil.copyAsImmutableList(containsNoNulls("fieldIndexers", fieldIndexers));
  this.searcherRegistration = searcherRegistration;
}
origin: com.atlassian.jira/jira-api

public JiraDataTypeImpl(final Collection<? extends Class<?>> types)
{
  notNull("types", types);
  not("types", types.isEmpty());
  this.types = CollectionUtil.copyAsImmutableList(types);
  final Collection<String> strTypes = Lists.newArrayListWithCapacity(types.size());
  for (final Class<?> type : types)
  {
    strTypes.add(type.getName());
  }
  stringTypes = Collections.unmodifiableCollection(strTypes);
}
origin: com.atlassian.jira/jira-core

void setProjectsWithBrowsePermission(final ApplicationUser user, final Collection<GenericValue> projectsWithBrowsePermission)
{
  //JRA-16757: Make an immutable copy of the returned list and return it. This will give a runtime exception anyone that is trying
  //to modify the list inline.
  final CacheKey cacheKey = new CacheKey(user);
  projectsWithBrowsePermissionForUser.put(cacheKey, CollectionUtil.copyAsImmutableList(projectsWithBrowsePermission));
  projectObjectsWithBrowsePermissionForUser.put(cacheKey, CollectionUtil.transform(projectsWithBrowsePermission, gvToProjectTransformer));
}
origin: com.atlassian.jira/jira-api

public CustomFieldSearcherInformation(final String id, final String nameKey, final List<? extends FieldIndexer> indexers,
    final AtomicReference<CustomField> fieldReference)
{
  super(id, nameKey, Collections.<Class<? extends FieldIndexer>>emptyList(), fieldReference, SearcherGroupType.CUSTOM);
  this.indexers = CollectionUtil.copyAsImmutableList(Assertions.notNull("indexers", indexers));
  Assertions.stateTrue("indexers", !this.indexers.isEmpty());
  this.fieldReference = fieldReference;
}
origin: com.atlassian.jira/jira-core

void setProjectObjectsWithBrowsePermission(final ApplicationUser user, final Collection<Project> projectsWithBrowsePermission)
{
  //JRA-16757: Make an immutable copy of the returned list and return it. This will give a runtime exception anyone that is trying
  //to modify the list inline.
  final CacheKey cacheKey = new CacheKey(user);
  projectObjectsWithBrowsePermissionForUser.put(cacheKey, CollectionUtil.copyAsImmutableList(projectsWithBrowsePermission));
  projectsWithBrowsePermissionForUser.put(cacheKey, CollectionUtil.transform(projectsWithBrowsePermission, projectToGVTransformer));
}
origin: com.atlassian.jira/jira-core

/**
 * @see #getFilteredList(java.util.List, java.util.Set)
 * @param source the list of chunks to filter
 * @param excludedTypes the diff types to exclude
 * @return an unmodifiable list of the remaining chunks
 */
private static List<CharacterChunk> getFilteredListOfCharacterChunks(final List<CharacterChunk> source, final Set<DiffType> excludedTypes)
{
  if (source != null)
  {
    final List<CharacterChunk> result = new ArrayList<CharacterChunk>(source.size());
    for (CharacterChunk chunk : source)
    {
      if (!excludedTypes.contains(chunk.getType()))
      {
        result.add(chunk);
      }
    }
    return CollectionUtil.copyAsImmutableList(result);
  }
  return Collections.emptyList();
}
origin: com.atlassian.jira/jira-api

public SearcherRegistration(final IssueSearcher<?> searcher, final List<ClauseRegistration> clauseRegistrations)
{
  this.searcher = notNull("searcher", searcher);
  this.clauseRegistrations = CollectionUtil.copyAsImmutableList(containsNoNulls("clauseRegistrations", clauseRegistrations));
}
origin: com.atlassian.jira/jira-api

public FunctionOperand(String name, Collection<String> args)
{
  this.name = Assertions.notNull("name", name);
  this.args = CollectionUtil.copyAsImmutableList(Assertions.notNull("args", args));
}
origin: com.atlassian.jira/jira-api

public JqlParseErrorMessage(final String key, final int lineNumber, final int columnNumber, final Collection<?> arguments)
{
  containsNoNulls("arguments", arguments);
  this.key = notBlank("key", key);
  this.arguments = CollectionUtil.copyAsImmutableList(arguments);
  this.lineNumber = lineNumber <= 0 ? -1 : lineNumber;
  this.columnNumber = columnNumber <= 0 ? -1 : columnNumber;
}
origin: com.atlassian.jira/jira-api

public SearcherGroup(SearcherGroupType type, Collection<IssueSearcher<?>> searchers)
{
  this.type = notNull("type", type);
  this.printHeader = StringUtils.isNotBlank(type.getI18nKey());
  this.searchers = CollectionUtil.copyAsImmutableList(containsNoNulls("searchers", searchers));
}
origin: com.atlassian.jira/jira-core

  @Override
  public CacheObject<List<FieldConfigScheme>> load(@Nonnull final String fieldId)
  {
    ConfigurableField field = (ConfigurableField) ComponentAccessor.getFieldManager().getField(fieldId);
    List<FieldConfigScheme> schemes = CollectionUtil.copyAsImmutableList(CachedFieldConfigSchemePersister.super.getConfigSchemesForCustomField(field));
    return  CacheObject.wrap(schemes);
  }
}
origin: com.atlassian.jira/jira-api

public MultiValueOperand(Collection<? extends Operand> values)
{
  containsNoNulls("values", values);
  not("values is empty", values.isEmpty());
  this.values = CollectionUtil.copyAsImmutableList(values);
  this.hashcode = calculateHashCode(this.values);
}
origin: com.atlassian.jira/jira-api

public GenericClauseQueryFactory(final String documentFieldName, List<OperatorSpecificQueryFactory> operatorQueryFactories, JqlOperandResolver operandResolver)
{
  this.documentFieldName = notNull("documentFieldName", documentFieldName);
  this.operandResolver = notNull("operandResolver", operandResolver);
  this.operatorQueryFactories = CollectionUtil.copyAsImmutableList(notNull("operatorQueryFactories", operatorQueryFactories));
}
origin: com.atlassian.jira/jira-core

/**
 * Filters some source chunks based on a set of excluded {@link com.atlassian.diff.DiffType}s.
 * Will go down into the {@link com.atlassian.diff.CharacterChunk} level as well.
 *
 * @param source the list of chunks to filter
 * @param excludedTypes the diff types to exclude
 * @return an unmodifiable list of the remaining chunks
 */
static List<DiffChunk> getFilteredList(final List<DiffChunk> source, final Set<DiffType> excludedTypes)
{
  final List<DiffChunk> result = new ArrayList<DiffChunk>(source.size());
  for (DiffChunk chunk : source)
  {
    if (!excludedTypes.contains(chunk.getType()))
    {
      // Now run through and make sure there are no invalid subchunks
      if (chunk instanceof WordChunk)
      {
        WordChunk wordChunk = (WordChunk)chunk;
        if (wordChunk.getCharacterChunks() != null)
        {
          final List<CharacterChunk> notDeletedChunks = getFilteredListOfCharacterChunks(wordChunk.getCharacterChunks(), excludedTypes);
          chunk = new WordChunk(wordChunk.getType(), notDeletedChunks);
        }
      }
      result.add(chunk);
    }
  }
  return CollectionUtil.copyAsImmutableList(result);
}
com.atlassian.jira.util.collectCollectionUtilcopyAsImmutableList

Javadoc

Return an immutable list copy of the passed collection.

Popular methods of CollectionUtil

  • filter
    Create a filtered Iterator.
  • transform
    Return a List that is transformed from elements of the input type to elements of the output type by
  • contains
    Does the supplied Iterator contain anything that matches the predicate?
  • foreach
    For each element in the iterator, consume the contents.
  • toList
    Turn the iterator into a list.
  • copyAsImmutableMap
    Return an immutable copy of the passed map. The type of the reurned map is not gaurenteed to match t
  • findFirstMatch
    Return the first found element that the predicate matches.
  • indexOf
    Returns the index of the first element that matches the predicate.
  • predicateAdapter
  • sort
    Copy and sort the passed collection and return an unmodifiable List of the elements.
  • toSet
    Turn the iterable into a Set.
  • transformIterator
    Return an Iterator that is transformed from elements of the input type to elements of the output typ
  • toSet,
  • transformIterator,
  • transformSet

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • startActivity (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now