Tabnine Logo
UserAgent$Agent.name
Code IndexAdd Tabnine to your IDE (free)

How to use
name
method
in
com.palantir.remoting3.clients.UserAgent$Agent

Best Java code snippets using com.palantir.remoting3.clients.UserAgent$Agent.name (Showing top 2 results out of 315)

origin: com.palantir.remoting3/http-clients

/**
 * Formats the given agent in the form {@code name/version (key:value; key:value)}, where the ()-block of comments
 * is omitted if zero comments are provided.
 */
private static String formatSingleAgent(UserAgent.Agent agent, Map<String, String> comments) {
  // TODO(rfink): Think about validation comments here? Must not contain special characters.
  StringBuilder formatted = new StringBuilder()
      .append(agent.name())
      .append("/")
      .append(agent.version());
  String formattedComments = COLON_SEMICOLON_JOINER.join(comments);
  if (!formattedComments.isEmpty()) {
    formatted.append(" (")
        .append(formattedComments)
        .append(')');
  }
  return formatted.toString();
}
origin: com.palantir.remoting3/http-clients

@Value.Check
default void check() {
  checkArgument(UserAgents.isValidName(name()), "Illegal agent name format: %s", name());
  // Should never hit the following.
  checkArgument(UserAgents.isValidVersion(version()), "Illegal version format: %s. This is a bug", version());
}
com.palantir.remoting3.clientsUserAgent$Agentname

Popular methods of UserAgent$Agent

  • of
  • version

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best plugins for Eclipse
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