Tabnine Logo
Pair.pair
Code IndexAdd Tabnine to your IDE (free)

How to use
pair
method
in
com.atlassian.fugue.Pair

Best Java code snippets using com.atlassian.fugue.Pair.pair (Showing top 20 results out of 315)

origin: com.atlassian.confluence/confluence-stateless-test-runner

public Builder ensureEnabled(Plugin plugin)
{
  this.plugins.add(pair(plugin, true));
  return this;
}
origin: com.atlassian.confluence/confluence-stateless-test-runner

public Builder ensureDisabled(Plugin plugin)
{
  this.plugins.add(pair(plugin, false));
  return this;
}
origin: com.atlassian.jira/jira-tests

public static <K, V> OrderedMapMatcher<K, V> orderedMap(K key1, V value1, K key2, V value2, K key3, V value3)
{
  return orderedMap(ImmutableList.of(pair(key1, value1), pair(key2, value2), pair(key3, value3)));
}
origin: com.atlassian.jira/jira-tests

public static <K, V> OrderedMapMatcher<K, V> orderedMap(K key1, V value1, K key2, V value2)
{
  return orderedMap(ImmutableList.of(pair(key1, value1), pair(key2, value2)));
}
origin: com.atlassian.confluence/confluence-stateless-test-runner

public Builder ensureModuleEnabled(final Plugin plugin, String moduleKey)
{
  if (!modules.containsKey(plugin))
  {
    modules.put(plugin, Sets.<Pair<String, Boolean>>newHashSet());
  }
  modules.get(plugin).add(pair(moduleKey, true));
  return this;
}
origin: com.atlassian.confluence/confluence-stateless-test-runner

public Builder ensureModuleDisabled(final Plugin plugin, String moduleKey)
{
  if (!modules.containsKey(plugin))
  {
    modules.put(plugin, Sets.<Pair<String, Boolean>>newHashSet());
  }
  modules.get(plugin).add(pair(moduleKey, false));
  return this;
}
origin: com.atlassian.jira/jira-core

  private Pair<Order, String> extractOrderAndField(String orderQuery)
  {
    Matcher matcher = PREFIX_FIELD_PATTERN.matcher(nullToEmpty(orderQuery).trim());
    matcher.find();
    String prefix = matcher.group(1);
    Order order = Strings.isNullOrEmpty(prefix) ? Order.ASC : (prefix.equals("+") ? Order.ASC : Order.DESC);

    return pair(order, matcher.group(2));
  }
}
origin: com.atlassian.jira/jira-tests

  private static <K, V> List<Pair<K, V>> toList(Map<? extends K, ? extends V> map)
  {
    return map.entrySet().stream()
        .map(e -> pair(e.getKey(), e.getValue()))
        .collect(Collectors.toList());
  }
}
origin: com.atlassian.jira/jira-core

@Override
public void addResult(final long count, final String msgKey)
{
  results.add(Pair.pair(i18n.getText(msgKey), count));
}
origin: com.atlassian.confluence/confluence-stateless-test-runner

public Builder ensureDisabled(String pluginKey)
{
  this.plugins.add(pair(new SimplePlugin(pluginKey), false));
  return this;
}
origin: com.atlassian.confluence/confluence-stateless-test-runner

public Builder level(Level level, String... loggers)
{
  for (String logger : loggers)
  {
    levels.add(pair(logger, option(level)));
  }
  return this;
}
origin: com.atlassian.confluence/confluence-stateless-test-runner

public Builder ensureEnabled(String pluginKey)
{
  this.plugins.add(pair(new SimplePlugin(pluginKey), true));
  return this;
}
public Builder ensureEnabled(Plugin plugin)
origin: com.atlassian.jira/jira-tests

public static <K, V> OrderedMapMatcher<K, V> orderedMap(K key1, V value1)
{
  return orderedMap(ImmutableList.of(pair(key1, value1)));
}
origin: com.atlassian.jira/jira-core

  /**
   * Transforms list of Eithers into two lists, which contains left and right values.
   */
  public static <L, R> Pair<List<L>, List<R>> splitEithers(final Iterable<Either<L, R>> eithers)
  {
    return Pair.<List<L>, List<R>>pair(
        ImmutableList.copyOf(Eithers.filterLeft(eithers)),
        ImmutableList.copyOf(Eithers.filterRight(eithers))
    );
  }
}
origin: com.atlassian.jira/jira-attachment-dmz

  @Override
  public Pair<Attachment, AttachmentKey> get(final Attachment attachment)
  {
    final Keys keys = issues.get(attachment.getIssueId());
    return Pair.pair(attachment, AttachmentKeys.from(keys.projectKey, keys.issueKey, attachment));
  }
});
origin: com.atlassian.plugins/atlassian-connect-server-core

public static Optional<Pair<String, String>> getMethod(HttpServletRequest rq) {
  Document doc = readDocument(rq);
  if (null == doc) {
    return Optional.empty();
  }
  Element root = doc.getRootElement();
  if (null == root) {
    return Optional.empty();
  }
  Element body = root.element("Body");
  if (null == body) {
    return Optional.empty();
  }
  Element methodElement = (Element) body.elements().get(0);
  if (null == methodElement) {
    return Optional.empty();
  }
  String name = methodElement.getName();
  String namespace = methodElement.getNamespaceURI();
  return Optional.of(Pair.pair(namespace, name));
}
origin: com.atlassian.plugins/atlassian-connect-core

  /**
   * This method gathers errors from all failed installations and combines them into one message.
   */
  private String describeAllFailures(List<MarketplaceInstallationResult> installations) {
    return installations.stream()
        .filter(MarketplaceInstallationResult::failed)
        .map(failure -> failure
            .getException().map(ex -> ex.getI18nKey() != null ? pair(ex.getI18nKey(), ex.getI18nArgs()) : null)
            .orElse(pair(failure.getError().get().getI18nKey(), new String[]{failure.getAddonKey()})))
        .map(pair -> i18nResolver.getText(pair.left(), pair.right()))
        .collect(Collectors.joining(" "));
  }
}
origin: com.atlassian.plugins/atlassian-connect-core

public Translations download(ConnectAddonBean addonBean) throws TranslationsDownloadException {
  List<DownloadResult<ResponsePromise>> downloadsInProgress =
      Stream.of(Language.values())
          .map(lang ->
              pair(lang, lang.getPath(addonBean.getTranslations().getPaths())))
          .filter(langAndPath ->
              langAndPath.right().isPresent())
          .map(langAndPath ->
              scheduleDownload(langAndPath.left(), addonBean.getBaseUrl(), langAndPath.right().get()))
          .collect(toList());
  final Map<Language, I18nKeysMapping> translations = downloadsInProgress.stream()
      .map(this::download)
      .collect(Collectors.toMap(DownloadResult::getLanguage, DownloadResult::getResult));
  return Translations.from(translations);
}
origin: com.atlassian.confluence/confluence-stateless-test-runner

private List<Pair<String, Option<Level>>> configureLevels()
{
  long start = System.currentTimeMillis();
  List<Pair<String, Option<Level>>> transformed = newArrayList();
  for (Pair<String, Option<Level>> level : levels)
  {
    Level newLevel = restClient.getAdminSession().getLoggingComponent().setLogLevel(level.left(), level.right().getOrNull());
    transformed.add(pair(level.left(), option(newLevel)));
  }
  LOG.info("Changed log levels in {}ms: {}", System.currentTimeMillis() - start, levels);
  return transformed;
}
origin: com.atlassian.plugins/base-hipchat-integration-plugin-api

  @Override
  public Pair<HipChatUserId, String> apply(final AOHipChatUser input) {
    return Pair.pair(new HipChatUserId(input.getHipChatUserId(), new HipChatLinkId(input.getHipChatLink().getID())), input.getHipChatUserName());
  }
});
com.atlassian.fuguePairpair

Popular methods of Pair

  • right
  • left
  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • getSupportFragmentManager (FragmentActivity)
  • getResourceAsStream (ClassLoader)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JFileChooser (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • CodeWhisperer alternatives
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