Tabnine Logo
String.concat
Code IndexAdd Tabnine to your IDE (free)

How to use
concat
method
in
java.lang.String

Best Java code snippets using java.lang.String.concat (Showing top 20 results out of 21,978)

origin: shuzheng/zheng

/**
 * 返回jsp视图
 * @param path
 * @return
 */
public static String jsp(String path) {
  return path.concat(".jsp");
}
origin: square/dagger

/** Returns a key for the members of {@code type}. */
public static String getMembersKey(Class<?> key) {
 // for classes key.getName() is equivalent to get(key)
 return "members/".concat(key.getName());
}
origin: shuzheng/zheng

/**
 * 返回thymeleaf视图
 * @param path
 * @return
 */
public static String thymeleaf(String path) {
  String folder = PropertiesFileUtil.getInstance().get("app.name");
  return "/".concat(folder).concat(path).concat(".html");
}
origin: androidannotations/androidannotations

public static void assertClassSourcesGeneratedToOutput(Class<?> clazz) {
  String canonicalName = clazz.getCanonicalName();
  String filePath = canonicalName.replace(".", "/").concat(".java");
  File generatedSourcesDir = new File(OUTPUT_DIRECTORY);
  File generatedSourceFile = new File(generatedSourcesDir, filePath);
  File sourcesDir = new File(MAIN_SOURCE_FOLDER);
  File expectedResult = new File(sourcesDir, filePath);
  assertOutput(expectedResult, generatedSourceFile);
}
origin: androidannotations/androidannotations

public static void assertClassSourcesNotGeneratedToOutput(Class<?> clazz) {
  String canonicalName = clazz.getCanonicalName();
  String filePath = canonicalName.replace(".", "/").concat(".java");
  File generatedSourcesDir = new File(OUTPUT_DIRECTORY);
  File output = new File(generatedSourcesDir, filePath);
  assertFalse(output.exists());
}
origin: redisson/redisson

/**
 * {@inheritDoc}
 */
public String getName() {
  return NAME_PREFIX.concat(String.valueOf(getIndex()));
}
origin: square/dagger

 @Override protected ModuleAdapter<?> create(Class<?> type) {
  ModuleAdapter<?> result =
    instantiate(type.getName().concat(MODULE_ADAPTER_SUFFIX), type.getClassLoader());
  if (result == null) {
   throw new IllegalStateException("Module adapter for " + type + " could not be loaded. "
     + "Please ensure that code generation was run for this module.");
  }
  return result;
 }
};
origin: spring-projects/spring-framework

/**
 * Find a {@code VersionStrategy} for the request path of the requested resource.
 * @return an instance of a {@code VersionStrategy} or null if none matches that request path
 */
@Nullable
protected VersionStrategy getStrategyForPath(String requestPath) {
  String path = "/".concat(requestPath);
  List<String> matchingPatterns = new ArrayList<>();
  for (String pattern : this.versionStrategyMap.keySet()) {
    if (this.pathMatcher.match(pattern, path)) {
      matchingPatterns.add(pattern);
    }
  }
  if (!matchingPatterns.isEmpty()) {
    Comparator<String> comparator = this.pathMatcher.getPatternComparator(path);
    matchingPatterns.sort(comparator);
    return this.versionStrategyMap.get(matchingPatterns.get(0));
  }
  return null;
}
origin: spring-projects/spring-framework

/**
 * Find a {@code VersionStrategy} for the request path of the requested resource.
 * @return an instance of a {@code VersionStrategy} or null if none matches that request path
 */
@Nullable
protected VersionStrategy getStrategyForPath(String requestPath) {
  String path = "/".concat(requestPath);
  List<String> matchingPatterns = new ArrayList<>();
  for (String pattern : this.versionStrategyMap.keySet()) {
    if (this.pathMatcher.match(pattern, path)) {
      matchingPatterns.add(pattern);
    }
  }
  if (!matchingPatterns.isEmpty()) {
    Comparator<String> comparator = this.pathMatcher.getPatternComparator(path);
    matchingPatterns.sort(comparator);
    return this.versionStrategyMap.get(matchingPatterns.get(0));
  }
  return null;
}
origin: hs-web/hsweb-framework

  /**
   *  转为http查询参数
   * @return
   */
  default String toHttpQueryParamString() {
    Map<String, String> result = new HttpParameterConverter(this).convert();
    StringJoiner joiner = new StringJoiner("&");
    result.forEach((key, value) -> joiner.add(key.concat("=").concat(value)));
    return joiner.toString();
  }
}
origin: macrozheng/mall

@Override
public OssCallbackResult callback(HttpServletRequest request) {
  OssCallbackResult result= new OssCallbackResult();
  String filename = request.getParameter("filename");
  filename = "http://".concat(ALIYUN_OSS_BUCKET_NAME).concat(".").concat(ALIYUN_OSS_ENDPOINT).concat("/").concat(filename);
  result.setFilename(filename);
  result.setSize(request.getParameter("size"));
  result.setMimeType(request.getParameter("mimeType"));
  result.setWidth(request.getParameter("width"));
  result.setHeight(request.getParameter("height"));
  return result;
}
origin: apache/flink

/**
 * Returns a unique, serialized representation for this function.
 */
public final String functionIdentifier() {
  final String md5 = EncodingUtils.hex(EncodingUtils.md5(EncodingUtils.encodeObjectToString(this)));
  return getClass().getCanonicalName().replace('.', '$').concat("$").concat(md5);
}
origin: hs-web/hsweb-framework

@Override
public String saveStaticFile(InputStream fileStream, String fileName) throws IOException {
  //文件后缀
  String suffix = fileName.contains(".") ?
      fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length()) : "";
  StorePath path = fastFileStorageClient.uploadFile(fileStream, fileStream.available(), suffix, new HashSet<>());
  return staticLocation.concat(path.getFullPath());
}
origin: hs-web/hsweb-framework

protected String getRealUrl(String url) {
  if (url.startsWith("http")) {
    return url;
  }
  if (!serverConfig.getApiBaseUrl().endsWith("/") && !url.startsWith("/")) {
    return serverConfig.getApiBaseUrl().concat("/").concat(url);
  }
  return serverConfig.getApiBaseUrl() + url;
}
origin: square/dagger

 @Override public StaticInjection getStaticInjection(Class<?> injectedClass) {
  StaticInjection result = instantiate(
     injectedClass.getName().concat(STATIC_INJECTION_SUFFIX), injectedClass.getClassLoader());
  if (result != null) {
   return result;
  }
  return ReflectiveStaticInjection.create(injectedClass);
 }
}
origin: hs-web/hsweb-framework

protected String createLockName(String expression) {
  try {
    if (StringUtils.isEmpty(expression)) {
      return interceptorHolder.getMethod().getName().concat("_").concat(interceptorHolder.getId());
    }
    return ExpressionUtils.analytical(expression, interceptorHolder.getArgs(), "spel");
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
}
origin: xuxueli/xxl-job

private void initI18n(){
  for (ExecutorBlockStrategyEnum item:ExecutorBlockStrategyEnum.values()) {
    item.setTitle(I18nUtil.getString("jobconf_block_".concat(item.name())));
  }
}
origin: hs-web/hsweb-framework

protected void applyBasicAuthParam(OAuth2Request request) {
  request.param(client_id, serverConfig.getClientId());
  request.param(client_secret, serverConfig.getClientSecret());
  request.param(redirect_uri, serverConfig.getRedirectUri());
  request.header(authorization, encodeAuthorization(serverConfig.getClientId().concat(":").concat(serverConfig.getClientSecret())));
}
origin: apache/kafka

@Override
public ProducerRecord<String, String> onSend(ProducerRecord<String, String> record) {
  ONSEND_COUNT.incrementAndGet();
  return new ProducerRecord<>(
      record.topic(), record.partition(), record.key(), record.value().concat(appendStr));
}
origin: apache/kafka

@Override
public ProducerRecord<Integer, String> onSend(ProducerRecord<Integer, String> record) {
  onSendCount++;
  if (throwExceptionOnSend)
    throw new KafkaException("Injected exception in AppendProducerInterceptor.onSend");
  return new ProducerRecord<>(
      record.topic(), record.partition(), record.key(), record.value().concat(appendStr));
}
java.langStringconcat

Javadoc

Concatenates the specified string to the end of this string.

If the length of the argument string is 0, then this String object is returned. Otherwise, a new String object is created, representing a character sequence that is the concatenation of the character sequence represented by this String object and the character sequence represented by the argument string.

Examples:

 
"cares".concat("s") returns "caress" 
"to".concat("get").concat("her") returns "together" 

Popular methods of String

  • equals
  • length
    Returns the number of characters in this string.
  • substring
    Returns a string containing a subsequence of characters from this string. The returned string shares
  • startsWith
    Compares the specified string to this string, starting at the specified offset, to determine if the
  • format
    Returns a formatted string, using the supplied format and arguments, localized to the given locale.
  • split
    Splits this string using the supplied regularExpression. See Pattern#split(CharSequence,int) for an
  • trim
  • valueOf
    Creates a new string containing the specified characters in the character array. Modifying the chara
  • indexOf
  • endsWith
    Compares the specified string to this string to determine if the specified string is a suffix.
  • toLowerCase
    Converts this string to lower case, using the rules of locale.Most case mappings are unaffected by t
  • contains
    Determines if this String contains the sequence of characters in the CharSequence passed.
  • toLowerCase,
  • contains,
  • getBytes,
  • <init>,
  • equalsIgnoreCase,
  • replace,
  • isEmpty,
  • charAt,
  • hashCode,
  • lastIndexOf

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • findViewById (Activity)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ImageIO (javax.imageio)
  • JList (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Github Copilot 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