下面列出了java.util.Map.Entry#getClass ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@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());
}
}
@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());
}
}