本文整理了Java中org.geotools.factory.Hints.fromPairs()
方法的一些代码示例,展示了Hints.fromPairs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hints.fromPairs()
方法的具体详情如下:
包路径:org.geotools.factory.Hints
类名称:Hints
方法名:fromPairs
[英]Utility method used to organize pairs into a Map.
[中]用于将配对组织成地图的实用方法。
代码示例来源:origin: org.geotools/gt2-metadata
/**
* Constructs a new object with key/value pairs from an array.
*
* @param pairs
* An array containing pairs of RenderingHints keys and values
*/
public Hints(final RenderingHints.Key key1, final Object value1, final Object[] pairs) {
this(fromPairs(key1, value1, pairs));
}
代码示例来源:origin: org.geotools/gt2-metadata
/**
* Constructs a new object from key/value pair.
* <p>
* This method is intended for use with Java5:
* <code>new Hints( Hints.BUFFER_LIMIT,1,Hints.BUFFER_POLICY,"weak" )</code>
*
* @param pairs
* Key value pairs
*/
public Hints(final RenderingHints.Key key1, final Object value1,
final RenderingHints.Key key2, final Object value2, Object[] pairs) {
this(fromPairs(key1, value1, key2, value2, pairs));
}
代码示例来源:origin: org.geotools/gt2-metadata
/**
* Constructs a new object with two key/value pair.
*
* @param key1 The key for the first pair
* @param value1 The value for the first pair
* @param key2 The key2 for the second pair
* @param value2 The value2 for the second pair
*/
public Hints(final RenderingHints.Key key1, final Object value1, final RenderingHints.Key key2, final Object value2) {
this( fromPairs( new Object[]{ key1, value1, key2, value2 } ) );
}
代码示例来源:origin: org.geotools/gt-metadata
/**
* Constructs a new object from key/value pair.
*
* @param key1 The key for the first pair.
* @param value1 The value for the first pair.
* @param key2 The key2 for the second pair.
* @param value2 The value2 for the second pair.
* @param pairs Additional pairs of keys and values.
*
* @since 2.4
*/
public Hints(final RenderingHints.Key key1, final Object value1,
final RenderingHints.Key key2, final Object value2,
final Object... pairs)
{
this(key1, value1, key2, value2);
fromPairs(pairs);
}
代码示例来源:origin: org.geotools/gt2-metadata
/**
* Utility method used to organize pairs into a Map.
*
* @param pairs
* An array of Key/Value pairs
* @return Map<Key,Value>
* @throws ClassCastException
* if Key/Value pairs do not match
*/
private static Map fromPairs(RenderingHints.Key key1, Object value1,
Object[] pairs) {
Map map = fromPairs(pairs);
map.put(key1, value1);
return map;
}
代码示例来源:origin: org.geotools/gt-metadata
/**
* Constructs a new object with key/value pairs from an array.
*
* @param key1 The key for the first pair.
* @param value1 The value for the first pair.
* @param pairs An array containing additional pairs of keys and values.
*
* @since 2.4
*
* @deprecated The {@code Object[]} argument was a kind of substitution for variable-length
* arguments. In order to avoid confusion, it is safer to use the later.
*/
@Deprecated
public Hints(final RenderingHints.Key key1, final Object value1, final Object[] pairs) {
this(key1, value1);
fromPairs(pairs);
}
代码示例来源:origin: org.geotools/gt2-metadata
/**
* Utility method used to organize pairs into a Map.
*
* @param pairs
* An array of Key/Value pairs
* @return Map<Key,Value>
* @throws ClassCastException
* if Key/Value pairs do not match
*/
private static Map fromPairs(RenderingHints.Key key1, Object value1,
RenderingHints.Key key2, Object value2, Object[] pairs) {
Map map = fromPairs(pairs);
map.put(key1, value1);
map.put(key2, value2);
return map;
}
内容来源于网络,如有侵权,请联系作者删除!