本文整理汇总了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;
}
示例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!");
}
}
示例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;
}
示例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;
}
示例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;
}
示例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");
}
}
}
示例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;
}
示例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();
}
示例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;
}
示例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.");
}
示例12: parseBase64Binary
import java.lang.String; //导入依赖的package包/类
public static byte[] parseBase64Binary(String s) throws Exception
{
return Base64.decode(s.replaceAll("\\s", ""));
}
示例13: parseGMonth
import java.lang.String; //导入依赖的package包/类
public static DateTime parseGMonth(String s)
{
return castToDateTime(s);
}
示例14: city
import java.lang.String; //导入依赖的package包/类
public @Nullable String city() {
return this.city;
}
示例15: write
import java.lang.String; //导入依赖的package包/类
public void write(String fileName)
{
write_0(nativeObj, fileName);
return;
}