当前位置: 首页>>代码示例>>Java>>正文


Java String类代码示例

本文整理汇总了Java中java.lang.String的典型用法代码示例。如果您正苦于以下问题:Java String类的具体用法?Java String怎么用?Java String使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


String类属于java.lang包,在下文中一共展示了String类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: NearestAntennaFromBouygues1

import java.lang.String; //导入依赖的package包/类
public NearestAntennaFromBouygues1(@Nonnull String __typename,
    @Nullable Coordinates5 coordinates, @Nullable String generation, @Nullable String provider,
    @Nullable String lastUpdate, @Nullable String status, @Nullable Integer dist,
    @Nullable String insee, @Nullable String city, @Nullable String addressLabel,
    @Nonnull Fragments fragments) {
  if (__typename == null) {
    throw new NullPointerException("__typename can't be null");
  }
  this.__typename = __typename;
  this.coordinates = coordinates;
  this.generation = generation;
  this.provider = provider;
  this.lastUpdate = lastUpdate;
  this.status = status;
  this.dist = dist;
  this.insee = insee;
  this.city = city;
  this.addressLabel = addressLabel;
  if (fragments == null) {
    throw new NullPointerException("fragments can't be null");
  }
  this.fragments = fragments;
}
 
开发者ID:gdrouet,项目名称:nightclazz-graphql,代码行数:24,代码来源:SearchQuery.java

示例2: SortingTest

import java.lang.String; //导入依赖的package包/类
public void SortingTest(String[] ms1, int m) {
    String[] ms2 = new String[m];
    boolean err = false;

    for (int i = 0; i < m; i++) {
        ms2[i] = ms1[i]; //copy input data
    }
    Arrays.sort(ms2); //sort data separately to compare with initial array
    for (int j = 0; j < m; j++)  {
            if (ms2[j].equalsIgnoreCase(ms1[j]) == false) { // if sorted array is not equal to initial array then the sorting error exists
                System.out.println("ERROR! Sorting is incorrect! Wrong initial element: " + ms1[j]);
                err = true;
            }
    }
    if (err == false) {
        System.out.println("ELEMENTS SORTING IS CORRECT!");
    }
}
 
开发者ID:tkulaha,项目名称:SeWebDriver_Homework,代码行数:19,代码来源:CountriesSortingTest.java

示例3: parse

import java.lang.String; //导入依赖的package包/类
@Override
public NonPrivateFieldsAndAccessorsFieldDetectionPolicyModel parse(JsonParser jsonParser) throws IOException {
    NonPrivateFieldsAndAccessorsFieldDetectionPolicyModel instance = new NonPrivateFieldsAndAccessorsFieldDetectionPolicyModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:19,代码来源:NonPrivateFieldsAndAccessorsFieldDetectionPolicyModel$$JsonObjectMapper.java

示例4: parse

import java.lang.String; //导入依赖的package包/类
@Override
public LowerCaseNamingPolicyModel parse(JsonParser jsonParser) throws IOException {
    LowerCaseNamingPolicyModel instance = new LowerCaseNamingPolicyModel();
    if (jsonParser.getCurrentToken() == null) {
        jsonParser.nextToken();
    }
    if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
        jsonParser.skipChildren();
        return null;
    }
    while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
        String fieldName = jsonParser.getCurrentName();
        jsonParser.nextToken();
        parseField(instance, fieldName, jsonParser);
        jsonParser.skipChildren();
    }
    return instance;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:19,代码来源:LowerCaseNamingPolicyModel$$JsonObjectMapper.java

示例5: imencode

import java.lang.String; //导入依赖的package包/类
public static boolean imencode(String ext, Mat img, MatOfByte buf)
{
    Mat buf_mat = buf;
    boolean retVal = imencode_1(ext, img.nativeObj, buf_mat.nativeObj);
    
    return retVal;
}
 
开发者ID:linzuzeng,项目名称:Microsphere,代码行数:8,代码来源:Imgcodecs.java

示例6: forward

import java.lang.String; //导入依赖的package包/类
public  void forward(List<Mat> outputBlobs, String outputName)
{
    Mat outputBlobs_mat = Converters.vector_Mat_to_Mat(outputBlobs);
    forward_2(nativeObj, outputBlobs_mat.nativeObj, outputName);
    
    return;
}
 
开发者ID:ravindu1024,项目名称:android-imaging-utils,代码行数:8,代码来源:Net.java

示例7: getProperty

import java.lang.String; //导入依赖的package包/类
@Override
public final Property getProperty(String columnName) {
  columnName = QueryBuilder.quoteIfNeeded(columnName);
  switch ((columnName)) {
    case "`sysId`":  {
      return sysId;
    }
    case "`message`":  {
      return message;
    }
    case "`id`":  {
      return id;
    }
    case "`sunset`":  {
      return sunset;
    }
    case "`sunrise`":  {
      return sunrise;
    }
    case "`type`":  {
      return type;
    }
    case "`country`":  {
      return country;
    }
    case "`pod`":  {
      return pod;
    }
    default: {
      throw new IllegalArgumentException("Invalid column name passed. Ensure you are calling the correct table's column");
    }
  }
}
 
开发者ID:QuixomTech,项目名称:WeatherStream,代码行数:34,代码来源:Sys_Table.java

示例8: imreadmulti

import java.lang.String; //导入依赖的package包/类
public static boolean imreadmulti(String filename, List<Mat> mats, int flags)
{
    Mat mats_mat = Converters.vector_Mat_to_Mat(mats);
    boolean retVal = imreadmulti_0(filename, mats_mat.nativeObj, flags);
    
    return retVal;
}
 
开发者ID:ykarim,项目名称:FTC2016,代码行数:8,代码来源:Imgcodecs.java

示例9: getSelects

import java.lang.String; //导入依赖的package包/类
public static String getSelects(String prefix, Field...ignoreFields){
	StringBuilder sb = new StringBuilder();
          if (null != ignoreFields){
              Arrays.sort(ignoreFields);
          }
          for ( Field field : Field.values()) {
              if (null != ignoreFields && Arrays.binarySearch(ignoreFields, field) >= 0){
                  continue;
              }
		sb.append(String.format(" %s.`%s` %s, ", prefix, field.getColumn(), field.name()));
	}
	sb.deleteCharAt(sb.length() - 2);
	return sb.toString();
}
 
开发者ID:egzosn,项目名称:spring-jdbc-orm,代码行数:15,代码来源:FreightDaoParams.java

示例10: imreadmulti

import java.lang.String; //导入依赖的package包/类
public static boolean imreadmulti(String filename, List<Mat> mats)
{
    Mat mats_mat = new Mat();
    boolean retVal = imreadmulti_1(filename, mats_mat.nativeObj);
    Converters.Mat_to_vector_Mat(mats_mat, mats);
    mats_mat.release();
    return retVal;
}
 
开发者ID:yippeesoft,项目名称:NotifyTools,代码行数:9,代码来源:Imgcodecs.java

示例11: getParamName

import java.lang.String; //导入依赖的package包/类
private String getParamName(VariableElement methodParam) {
    Param paramAnnotation = methodParam.getAnnotation(Param.class);
    if (paramAnnotation != null) {
        return paramAnnotation.value();
    }
    throw new IllegalArgumentException("Parameter " + methodParam.getSimpleName() + " doesn't have " + Param.class.getSimpleName() + " annotation with name.");
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:8,代码来源:ClassCrawler.java

示例12: parseBase64Binary

import java.lang.String; //导入依赖的package包/类
public static byte[] parseBase64Binary(String s) throws Exception
{
	return Base64.decode(s.replaceAll("\\s", ""));
}
 
开发者ID:CenPC434,项目名称:java-tools,代码行数:5,代码来源:CoreTypes.java

示例13: parseGMonth

import java.lang.String; //导入依赖的package包/类
public static DateTime parseGMonth(String s)
{
	return castToDateTime(s);
}
 
开发者ID:CenPC434,项目名称:java-tools,代码行数:5,代码来源:CoreTypes.java

示例14: city

import java.lang.String; //导入依赖的package包/类
public @Nullable String city() {
  return this.city;
}
 
开发者ID:gdrouet,项目名称:nightclazz-graphql,代码行数:4,代码来源:SearchQuery.java

示例15: write

import java.lang.String; //导入依赖的package包/类
public  void write(String fileName)
{
    
    write_0(nativeObj, fileName);
    
    return;
}
 
开发者ID:yippeesoft,项目名称:NotifyTools,代码行数:8,代码来源:FeatureDetector.java


注:本文中的java.lang.String类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。