/** * A simple abstract iterator which implements the remove method as unsupported operation. * * @param <T> The type of iterator data. */ @PublicEvolving public abstract class SamplingIterator<T> implements Iterator<T> { @Override public void remove() { throw new UnsupportedOperationException("This operation is not supported."); } }
/** * This class <code>Optional</code> is a helper class used in specifying * whether a argument for the directive is optional or not. * * <p>This class is used when you are defining the usage for a directive * argument. Following is an example : </p> * * <code> * UsageDefinition.Builder builder = UsageDefinition.builder(NAME); * builder.define("regex", TokenType.TEXT, Optional.TRUE); * return builder.build(); * </code> * * <p>By default, the option is <code>FALSE</code></p> */ @Public public final class Optional { /** * When an argument is optional, <code>TRUE</code> is specified. */ public static final boolean TRUE = true; /** * When an argument is non optional, <code>FALSE</code> is specified. * The default behavior is false. */ public static final boolean FALSE = false; }
/** * Interface for calculating metrics over the records being processed. */ @PublicEvolving public interface Statistics { /** * Aggregates statistics for all the rows. * * @param rows to be aggregated. * @return Summary in the form of {@link Row} */ public Row aggregate(List<Row> rows); }
@Public public class CompileException extends Exception { private Iterator<SyntaxError> errors;
/** * Interface for Validating 'T' properties. */ @PublicEvolving public interface Validator<T> { /** * Initializes the validator. * @throws Exception thrown when there are initialization error. */ public void initialize() throws Exception; /** * Validates the T properties. * * @param value to be validated. * @throws ValidatorException thrown when there are issues with validation. */ public void validate(T value) throws ValidatorException; }
@Public public final class MessagesFactory {
/** * A specification for how {@link RecipePipeline} will process. */ @PublicEvolving public interface RecipeParser extends Serializable { /** * Generates a configured set of {@link Executor} to be executed. * * @return List of {@link Executor}. */ List<Executor> parse() throws DirectiveLoadException, DirectiveNotFoundException, DirectiveParseException; /** * Initialises the directive with a {@link DirectiveContext}. * * @param context, instance of context object or null. */ @Nullable void initialize(DirectiveContext context); }
@Public public final class Triplet<F, S, T> { private final F first;
/** * Class description here. */ @PublicEvolving public class Ranges implements Token { private final List<Triplet<Numeric, Numeric, String>> values; public Ranges(List<Triplet<Numeric, Numeric, String>> values) { this.values = values; } @Override public List<Triplet<Numeric, Numeric, String>> value() { return values; } @Override public TokenType type() { return TokenType.RANGES; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); return object; } }
/** * Class description here. */ @PublicEvolving public class DirectiveName implements Token { private String value; public DirectiveName(String value) { this.value = value; } @Override public String value() { return value; } @Override public TokenType type() { return TokenType.DIRECTIVE_NAME; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); object.addProperty("type", TokenType.DIRECTIVE_NAME.name()); object.addProperty("value", value); return object; } }
/** * Class description here. */ @PublicEvolving public class Text implements Token { private String value; public Text(String value) { this.value = value; } @Override public String value() { return value; } @Override public TokenType type() { return TokenType.TEXT; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); object.addProperty("type", TokenType.TEXT.name()); object.addProperty("value", value); return object; } }
/** * Class description here. */ @PublicEvolving public class Numeric implements Token { private final LazyNumber value; public Numeric(LazyNumber value) { this.value = value; } @Override public LazyNumber value() { return value; } @Override public TokenType type() { return TokenType.NUMERIC; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); object.addProperty("type", TokenType.NUMERIC.name()); object.addProperty("value", value); return object; } }
/** * */ @PublicEvolving public class ColumnName implements Token { private String value; public ColumnName(String value) { this.value = value; } @Override public String value() { return value; } @Override public TokenType type() { return TokenType.COLUMN_NAME; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); object.addProperty("type", TokenType.COLUMN_NAME.name()); object.addProperty("value", value); return object; } }
/** * Class description here. */ @PublicEvolving public class Expression implements Token { private String value; public Expression(String value) { this.value = value; } @Override public String value() { return value; } @Override public TokenType type() { return TokenType.EXPRESSION; } @Override public JsonElement toJson() { JsonObject object = new JsonObject(); object.addProperty("type", TokenType.EXPRESSION.name()); object.addProperty("value", value); return object; } }
@PublicEvolving public class Properties implements Token { private Map<String, Token> values;
@PublicEvolving public abstract class Sampler<T> { protected final static double EPSILON = 1e-5;
@PublicEvolving public class ColumnNameList implements Token { private List<String> values = new ArrayList<>();
@PublicEvolving public class NumericList implements Token { private final List<LazyNumber> values;
@PublicEvolving public interface StaticCatalog extends Serializable {
@PublicEvolving public class TextList implements Token { private List<String> values;