@Override public Comparator<double[]> getComparator() { throw new IAE("Comparing arrays of estimates and error bounds is not supported"); }
@Override public Comparator<double[]> getComparator() { throw new IAE("Comparing arrays of p values is not supported"); }
@Override public Comparator<double[]> getComparator() { throw new IAE("Comparing histograms is not supported"); }
public void setSize(int size) { if (size < 0 || size > expansion.length) { throw new IAE("Size[%d] > expansion.length[%d] or < 0", size, expansion.length); } this.size = size; }
public void setSize(int size) { if (size < 0) { throw new IAE("Size[%d] must be non-negative", size); } this.size = size; }
@Override public Comparator<double[]> getComparator() { throw new IAE("Comparing arrays of mean values is not supported"); }
@Override public Comparator<String> getComparator() { throw new IAE("Comparing sketch summaries is not supported"); }
public Builder setHasMultipleValues(boolean hasMultipleValues) { if (this.hasMultipleValues != null && this.hasMultipleValues != hasMultipleValues) { throw new IAE( "hasMultipleValues[%s] is already set, cannot change to[%s]", this.hasMultipleValues, hasMultipleValues ); } this.hasMultipleValues = hasMultipleValues; return this; }
@Override public int get(int index) { if (index < 0 || index >= size) { throw new IAE("index[%d] >= size[%d] or < 0", index, size); } return index; }
@Override public int get(int i) { if (i != 0) { throw new IAE("%d != 0", i); } return value; }
@Override public int get(int index) { if (index < 0 || index >= size) { throw new IAE("index[%d] >= size[%d] or < 0", index, size); } return expansion[index]; }
private static String getAvaticaConnectionId(Map<String, Object> requestMap) { Object connectionIdObj = requestMap.get("connectionId"); if (connectionIdObj == null) { throw new IAE("Received an Avatica request without a connectionId."); } if (!(connectionIdObj instanceof String)) { throw new IAE("Received an Avatica request with a non-String connectionId."); } return (String) connectionIdObj; }
public InputRow formatRow(InputRow row) { for (Function<InputRow, InputRow> rowTransformer : rowTransformers) { row = rowTransformer.apply(row); } if (row == null) { throw new IAE("Row is null? How can this be?!"); } return row; }
private static String convertValue(Object dimension, String name) { final String retVal; if (dimension instanceof String) { retVal = (String) dimension; } else if (dimension instanceof Map) { retVal = (String) ((Map) dimension).get(name); } else { throw new IAE("Unknown type[%s] for dimension[%s]", dimension.getClass(), dimension); } return retVal; }
public static String getString(Map<String, Object> in, String key, String defaultValue) { Object retVal = in.get(key); if (retVal == null) { if (defaultValue == null) { throw new IAE("Key[%s] is required in map[%s]", key, in); } return defaultValue; } return retVal.toString(); }
@JsonCreator public ArrayOfDoublesSketchTTestPostAggregator( @JsonProperty("name") final String name, @JsonProperty("fields") List<PostAggregator> fields ) { super(name, fields); if (fields.size() != 2) { throw new IAE("Illegal number of fields[%d], must be 2", fields.size()); } }
public S3Coords(URI uri) { if (!"s3".equalsIgnoreCase(uri.getScheme())) { throw new IAE("Unsupported scheme: [%s]", uri.getScheme()); } bucket = uri.getHost(); String path = uri.getPath(); if (path.startsWith("/")) { path = path.substring(1); } this.path = path; }
public static URI checkURI(URI uri) { if (uri.getScheme().equalsIgnoreCase(scheme)) { uri = URI.create("s3" + uri.toString().substring(scheme.length())); } else if (!"s3".equalsIgnoreCase(uri.getScheme())) { throw new IAE("Don't know how to load scheme for URI [%s]", uri.toString()); } return uri; }
@Override public int get(int index) { if (index < 0 || index >= size) { throw new IAE("Index[%d] >= size[%d] or < 0", index, size); } return base.get(offset + index); }
@Nullable public DateTime getMinTime() { if (value instanceof Map) { return getDateTimeValue(((Map) value).get(TimeBoundaryQuery.MIN_TIME)); } else { throw new IAE("MinTime not supported!"); } }