}
@Override
public Esi4JManagedIndex getMultiIndex(List<String> names) {
if (CollectionUtils.empty(names)) {
return new DefaultManagedMultiIndex(_indexes.values());
} else if (names.size() == 1) {
String name = names.get(0);
if ("*".equals(name)) {
return new DefaultManagedMultiIndex(_indexes.values());
} else {
return getIndex(name);
}
} else {
List<InternalIndex> indices = Lists.newArrayListWithCapacity(names.size());
for (String name : names) {
indices.add(getIndex(name));
}
return new DefaultManagedMultiIndex(indices);
}
}