📄 flowdictionary.java
字号:
return getFloat(key);
}
/**
* Returns the <code>float</code> value to which the specified key is mapped,
* or a Flow4JRuntimeException if no such key exists in the dictionary.
* @param key the key whose associated value is to be returned.
* @return the <code>float</code> value to which this map maps the specified key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public float f(String key) throws Flow4JRuntimeException {
return getFloat(key).floatValue();
}
/**
* Returns the <code>Double</code> value to which the specified key is mapped,
* or null if the map contains no mapping for this key
* @param key the key whose associated value is to be returned.
* @return the <code>Double</code> value to which this map maps the specified key,
* or null if the map contains no mapping for this key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public Double getDouble(String key) throws Flow4JRuntimeException {
if (! extContainsKey(key))
throw new Flow4JRuntimeException("Dictionary does not contain key \"" + key + "\"");
return (Double)extGet(key);
}
/**
* Returns the <code>Double</code> value to which the specified key is mapped,
* or null if the map contains no mapping for this key
* @param key the key whose associated value is to be returned.
* @return the <code>Double</code> value to which this map maps the specified key,
* or null if the map contains no mapping for this key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public Double D(String key) throws Flow4JRuntimeException {
return getDouble(key);
}
/**
* Returns the <code>double</code> value to which the specified key is mapped,
* or a Flow4JRuntimeException if no such key exists in the dictionary.
* @param key the key whose associated value is to be returned.
* @return the <code>double</code> value to which this map maps the specified key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public double d(String key) throws Flow4JRuntimeException {
return getDouble(key).doubleValue();
}
/**
* Returns the <code>Short</code> value to which the specified key is mapped,
* or null if the map contains no mapping for this key
* @param key the key whose associated value is to be returned.
* @return the <code>Short</code> value to which this map maps the specified key,
* or null if the map contains no mapping for this key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public Short getShort(String key) throws Flow4JRuntimeException {
if (! extContainsKey(key))
throw new Flow4JRuntimeException("Dictionary does not contain key \"" + key + "\"");
return (Short)extGet(key);
}
/**
* Returns the <code>Short</code> value to which the specified key is mapped,
* or null if the map contains no mapping for this key
* @param key the key whose associated value is to be returned.
* @return the <code>Short</code> value to which this map maps the specified key,
* or null if the map contains no mapping for this key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public Short S(String key) throws Flow4JRuntimeException {
return getShort(key);
}
/**
* Returns the <code>short</code> value to which the specified key is mapped,
* or a Flow4JRuntimeException if no such key exists in the dictionary.
* @param key the key whose associated value is to be returned.
* @return the <code>short</code> value to which this map maps the specified key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public short s(String key) throws Flow4JRuntimeException {
return getShort(key).shortValue();
}
/**
* Returns the <code>Long</code> value to which the specified key is mapped,
* or null if the map contains no mapping for this key
* @param key the key whose associated value is to be returned.
* @return the <code>Long</code> value to which this map maps the specified key,
* or null if the map contains no mapping for this key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public Long getLong(String key) throws Flow4JRuntimeException {
if (! extContainsKey(key))
throw new Flow4JRuntimeException("Dictionary does not contain key \"" + key + "\"");
return (Long)extGet(key);
}
/**
* Returns the <code>Long</code> value to which the specified key is mapped,
* or null if the map contains no mapping for this key
* @param key the key whose associated value is to be returned.
* @return the <code>Long</code> value to which this map maps the specified key,
* or null if the map contains no mapping for this key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public Long L(String key) throws Flow4JRuntimeException {
return getLong(key);
}
/**
* Returns the <code>long</code> value to which the specified key is mapped,
* or a Flow4JRuntimeException if no such key exists in the dictionary.
* @param key the key whose associated value is to be returned.
* @return the <code>long</code> value to which this map maps the specified key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public long l(String key) throws Flow4JRuntimeException {
return getLong(key).longValue();
}
/**
* Returns the <code>Boolean</code> value to which the specified key is mapped,
* or null if the map contains no mapping for this key
* @param key the key whose associated value is to be returned.
* @return the <code>Boolean</code> value to which this map maps the specified key,
* or null if the map contains no mapping for this key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public Boolean getBoolean(String key) throws Flow4JRuntimeException {
if (! extContainsKey(key))
throw new Flow4JRuntimeException("Dictionary does not contain key \"" + key + "\"");
return (Boolean)extGet(key);
}
/**
* Returns the <code>Boolean</code> value to which the specified key is mapped,
* or null if the map contains no mapping for this key
* @param key the key whose associated value is to be returned.
* @return the <code>Boolean</code> value to which this map maps the specified key,
* or null if the map contains no mapping for this key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public Boolean Bool(String key) throws Flow4JRuntimeException {
if (! extContainsKey(key))
throw new Flow4JRuntimeException("Dictionary does not contain key \"" + key + "\"");
return (Boolean)extGet(key);
}
/**
* Returns the <code>Boolean</code> value to which the specified key is mapped,
* or null if the map contains no mapping for this key
* @param key the key whose associated value is to be returned.
* @return the <code>Boolean</code> value to which this map maps the specified key,
* or null if the map contains no mapping for this key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public Boolean B(String key) throws Flow4JRuntimeException {
if (! extContainsKey(key))
throw new Flow4JRuntimeException("Dictionary does not contain key \"" + key + "\"");
return (Boolean)extGet(key);
}
/**
* Returns the <code>boolean</code> value to which the specified key is mapped,
* or a Flow4JRuntimeException if no such key exists in the dictionary.
* @param key the key whose associated value is to be returned.
* @return the <code>boolean</code> value to which this map maps the specified key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public boolean bool(String key) throws Flow4JRuntimeException {
return getBoolean(key).booleanValue();
}
/**
* Returns the <code>boolean</code> value to which the specified key is mapped,
* or a Flow4JRuntimeException if no such key exists in the dictionary.
* @param key the key whose associated value is to be returned.
* @return the <code>boolean</code> value to which this map maps the specified key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public boolean b(String key) throws Flow4JRuntimeException {
return getBoolean(key).booleanValue();
}
/**
* Returns the <code>Object</code> value to which the specified key is mapped,
* or null if the map contains no mapping for this key
* @param key the key whose associated value is to be returned.
* @return the <code>Object</code> value to which this map maps the specified key,
* or null if the map contains no mapping for this key
* @throws Flow4JRuntimeException if the dictionary does not contain such a key
*/
public Object obj(String key) throws Flow4JRuntimeException {
if (! extContainsKey(key))
throw new Flow4JRuntimeException("Dictionary does not contain key \"" + key + "\"");
return (Object)extGet(key);
}
/**
* Returns the Dictionary Contents.
*/
public String toString() {
StringBuffer buf = new StringBuffer("Dictionary contents:\n");
for (Iterator iter = entrySet().iterator(); iter.hasNext();) {
Map.Entry entry = (Map.Entry) iter.next();
buf.append(" ").append(entry.getKey()).append(" = ").append(entry.getValue()).append("\n");
}
return buf.toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -