return response;
}
@Override
protected SpecificationLookupResponse visitSpecificationLookupRequest(final SpecificationLookupRequest request) {
final LongList identifiers = new AbstractLongList() {
private List<Long> _raw = request.getIdentifier();
@Override
public long getLong(int index) {
return _raw.get(index);
}
@Override
public int size() {
return _raw.size();
}
};
final Collection<ValueSpecification> specifications;
if (identifiers.size() == 1) {
specifications = Collections.singleton(getUnderlying().getValueSpecification(identifiers.getLong(0)));
} else {
final Long2ObjectMap<ValueSpecification> specificationMap = getUnderlying().getValueSpecifications(identifiers);
specifications = new ArrayList<ValueSpecification>(specificationMap.size());
for (Long identifier : identifiers) {
specifications.add(specificationMap.get(identifier));