java.util.Map.Entry#getClass ( )源码实例Demo

下面列出了java.util.Map.Entry#getClass ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: datawave   文件: CompositeQueryLogicTest.java
@Override
public TestQueryResponse transform(Entry<?,?> input) {
    if (input instanceof Entry<?,?>) {
        @SuppressWarnings("unchecked")
        Entry<Key,org.apache.accumulo.core.data.Value> entry = (Entry<Key,org.apache.accumulo.core.data.Value>) input;
        TestQueryResponse r = new TestQueryResponse();
        r.setKey(entry.getKey().toString());
        r.setValue(new String(entry.getValue().toString()));
        return r;
    } else {
        throw new IllegalArgumentException("Invalid input type: " + input.getClass());
    }
}
 
源代码2 项目: datawave   文件: CompositeQueryLogicTest.java
@Override
public TestQueryResponse transform(Entry<?,?> input) {
    if (input instanceof Entry<?,?>) {
        @SuppressWarnings("unchecked")
        Entry<Key,org.apache.accumulo.core.data.Value> entry = (Entry<Key,org.apache.accumulo.core.data.Value>) input;
        TestQueryResponse r = new TestQueryResponse();
        r.setKey(entry.getKey().toString());
        r.setValue(new String(entry.getValue().get()));
        return r;
    } else {
        throw new IllegalArgumentException("Invalid input type: " + input.getClass());
    }
}