congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Tag.of
Code IndexAdd Tabnine to your IDE (free)

How to use
of
method
in
org.ballerinalang.util.metrics.Tag

Best Java code snippets using org.ballerinalang.util.metrics.Tag.of (Showing top 3 results out of 315)

origin: org.ballerinalang/ballerina-core

/**
 * Populate tags from a key/value pair.
 *
 * @param tags  An existing set of {@link Tag Tags}.
 * @param key   The tag key.
 * @param value The tag value.
 */
public static void tag(Set<Tag> tags, String key, String value) {
  tags.add(Tag.of(key, value));
}
origin: org.ballerinalang/ballerina-core

  /**
   * Populate tags from a map of key/value pairs.
   *
   * @param tags    An existing set of {@link Tag Tags}.
   * @param tagsMap A map of key value pairs to be used as tags
   */
  public static void tags(Set<Tag> tags, Map<String, String> tagsMap) {
    tagsMap.forEach((key, value) -> tags.add(Tag.of(key, value)));
  }
}
origin: org.ballerinalang/ballerina-core

/**
 * Populate tags from key/value pairs.
 *
 * @param tags      An existing set of {@link Tag Tags}.
 * @param keyValues Must be an even number of arguments representing key/value pairs of tags.
 */
public static void tags(Set<Tag> tags, String... keyValues) {
  if (keyValues == null || keyValues.length == 0) {
    return;
  }
  if (keyValues.length % 2 == 1) {
    throw new IllegalArgumentException("size must be even, it is a set of key=value pairs");
  }
  for (int i = 0; i < keyValues.length; i += 2) {
    tags.add(Tag.of(keyValues[i], keyValues[i + 1]));
  }
}
org.ballerinalang.util.metricsTagof

Popular methods of Tag

  • <init>
  • getKey
  • getValue

Popular in Java

  • Making http requests using okhttp
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JLabel (javax.swing)
  • JPanel (javax.swing)
  • 21 Best Atom Packages for 2021
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