com.mindee.parsing.common.Pages Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mindee-api-java Show documentation
Show all versions of mindee-api-java Show documentation
Java Library to call Mindee's Off-The-Shelf and Custom APIs
The newest version!
package com.mindee.parsing.common;
import java.util.ArrayList;
import java.util.stream.Collectors;
/**
* List of all pages in the inference.
* @param
*/
public class Pages extends ArrayList> {
@Override
public String toString() {
return this.stream()
.map(Page::toString)
.collect(Collectors.joining(String.format("%n")));
}
/**
* Returns whether any predictions are set.
*/
public boolean hasPrediction() {
return (!this.isEmpty() && !this.get(0).isPredictionEmpty());
}
}