Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public OneCandidate documentType() {
return documentType(defaultPageIdx);
}

@Nullable
public OneCandidate documentType(int pageIdx) {
ChosenDocumentTypeResult result = getResult(Result.DOCUMENT_TYPE, pageIdx);
if (result != null) {
Expand All @@ -122,6 +123,7 @@ public OneCandidate documentType(int pageIdx) {
return null;
}

@Nullable
public <R> R resultByType(Result type) {
for (ResultItem item : originalResponse.getContainerList().getList()) {
if (item.getResultType() == type) {
Expand All @@ -131,6 +133,7 @@ public <R> R resultByType(Result type) {
return null;
}

@Nullable
public <R> R getResult(Result type, int page_idx) {
for (ResultItem item : originalResponse.getContainerList().getList()) {
if (item.getResultType() == type && item.getPageIdx() == page_idx) {
Expand All @@ -140,6 +143,7 @@ public <R> R getResult(Result type, int page_idx) {
return null;
}

@Nullable
public <R> List<R> resultsByType(Result type) {
List<R> results = new ArrayList<>();
for (ResultItem item : originalResponse.getContainerList().getList()) {
Expand Down