本文整理了Java中org.springframework.batch.item.ExecutionContext.readAndValidate()
方法的一些代码示例,展示了ExecutionContext.readAndValidate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExecutionContext.readAndValidate()
方法的具体详情如下:
包路径:org.springframework.batch.item.ExecutionContext
类名称:ExecutionContext
方法名:readAndValidate
[英]Utility method that attempts to take a value represented by a given key and validate it as a member of the specified type.
[中]尝试获取给定键表示的值并将其验证为指定类型的成员的实用方法。
代码示例来源:origin: spring-projects/spring-batch
/**
* Typesafe Getter for the String represented by the provided key.
*
* @param key The key to get a value for
* @return The <code>String</code> value
*/
public String getString(String key) {
return (String) readAndValidate(key, String.class);
}
代码示例来源:origin: spring-projects/spring-batch
/**
* Typesafe Getter for the Long represented by the provided key.
*
* @param key The key to get a value for
* @return The <code>Long</code> value
*/
public long getLong(String key) {
return (Long) readAndValidate(key, Long.class);
}
代码示例来源:origin: spring-projects/spring-batch
/**
* Typesafe Getter for the Integer represented by the provided key.
*
* @param key The key to get a value for
* @return The <code>Integer</code> value
*/
public int getInt(String key) {
return (Integer) readAndValidate(key, Integer.class);
}
代码示例来源:origin: spring-projects/spring-batch
/**
* Typesafe Getter for the Double represented by the provided key.
*
* @param key The key to get a value for
* @return The <code>Double</code> value
*/
public double getDouble(String key) {
return (Double) readAndValidate(key, Double.class);
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Typesafe Getter for the Double represented by the provided key.
*
* @param key The key to get a value for
* @return The <code>Double</code> value
*/
public double getDouble(String key) {
return (Double) readAndValidate(key, Double.class);
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Typesafe Getter for the Integer represented by the provided key.
*
* @param key The key to get a value for
* @return The <code>Integer</code> value
*/
public int getInt(String key) {
return (Integer) readAndValidate(key, Integer.class);
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Typesafe Getter for the String represented by the provided key.
*
* @param key The key to get a value for
* @return The <code>String</code> value
*/
public String getString(String key) {
return (String) readAndValidate(key, String.class);
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Typesafe Getter for the Long represented by the provided key.
*
* @param key The key to get a value for
* @return The <code>Long</code> value
*/
public long getLong(String key) {
return (Long) readAndValidate(key, Long.class);
}
内容来源于网络,如有侵权,请联系作者删除!