capnproto-java-rpc/runtime/src/main/java/org/capnproto/ReaderCapabilityTable.java

18 lines
358 B
Java
Raw Normal View History

2020-09-27 22:20:33 +00:00
package org.capnproto;
import java.util.List;
class ReaderCapabilityTable implements CapTableReader {
final List<ClientHook> table;
ReaderCapabilityTable(List<ClientHook> table) {
this.table = table;
}
@Override
public ClientHook extractCap(int index) {
return index < table.size() ? table.get(index) : null;
}
}