com.google.gdata.client.Query.getStringCustomParameter()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中com.google.gdata.client.Query.getStringCustomParameter方法的一些代码示例,展示了Query.getStringCustomParameter的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getStringCustomParameter方法的具体详情如下:
包路径:com.google.gdata.client.Query
类名称:Query
方法名:getStringCustomParameter

Query.getStringCustomParameter介绍

[英]Gets an existing String custom parameter, with null signifying that the parameter is not specified.
[中]获取现有的字符串自定义参数,null表示未指定该参数。

代码示例

代码示例来源:origin: com.google.gdata/gdata-core-1.0

/**
  * Gets an existing Integer custom paramter, with null signifying that
  * the parameter is not specified or not an integer.
  * 
  * @param name the name of the parameter
  * @return the value of the parameter, or null if it is unspecified
  *         or non-integer
  */
 public final Integer getIntegerCustomParameter(String name) {
  String strValue = getStringCustomParameter(name);
  Integer intValue;

  if (strValue != null) {
   try {
    intValue = Integer.valueOf(Integer.parseInt(strValue));
   } catch (NumberFormatException nfe) {
    intValue = null;
   }
  } else {
   intValue = null;
  }

  return intValue;
 }
}

代码示例来源:origin: com.google.gdata/gdata-java-client

/**
  * Gets an existing Integer custom paramter, with null signifying that
  * the parameter is not specified or not an integer.
  * 
  * @param name the name of the parameter
  * @return the value of the parameter, or null if it is unspecified
  *         or non-integer
  */
 public final Integer getIntegerCustomParameter(String name) {
  String strValue = getStringCustomParameter(name);
  Integer intValue;

  if (strValue != null) {
   try {
    intValue = Integer.valueOf(Integer.parseInt(strValue));
   } catch (NumberFormatException nfe) {
    intValue = null;
   }
  } else {
   intValue = null;
  }

  return intValue;
 }
}

代码示例来源:origin: com.mulesoft.google/google-api-gdata

/**
  * Gets an existing Integer custom paramter, with null signifying that
  * the parameter is not specified or not an integer.
  * 
  * @param name the name of the parameter
  * @return the value of the parameter, or null if it is unspecified
  *         or non-integer
  */
 public final Integer getIntegerCustomParameter(String name) {
  String strValue = getStringCustomParameter(name);
  Integer intValue;

  if (strValue != null) {
   try {
    intValue = Integer.valueOf(Integer.parseInt(strValue));
   } catch (NumberFormatException nfe) {
    intValue = null;
   }
  } else {
   intValue = null;
  }

  return intValue;
 }
}

相关文章