當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。