protected ProjectionPassthroughVectorWriter(final OjaiValueWriter valueWriter, final FieldProjector projector, final boolean includeId) { super(valueWriter); this.includeId = includeId; this.projector = Preconditions.checkNotNull(projector); }
@Override public Object getObject(int index) { Preconditions.checkElementIndex(index, valueCount); return null; }
public JsonNode asNode(){ Preconditions.checkArgument(this.root != null, "Attempted to grab JSONOptions as JsonNode when no root node was stored. You can only convert non-opaque JSONOptions values to JsonNodes."); return root; }
public synchronized Exception getAndClear() { Preconditions.checkState(!isClosed); if (exception != null) { final Exception local = exception; exception = null; return local; } return null; }
@Override public int hashCode() { return Objects.hashCode(key, value); } }
/** Runs all handlers registered for this Hook, with the given argument. */ public void run(Object arg) { for (Function<Object, Object> handler : handlers) { handler.apply(arg); } }
/** * Set the current iterator location to the given index offset. * * @param index 0-based index into the current array */ public void set(int index) { Preconditions.checkPositionIndex(index, length); position = index; }
protected BaseValueVector(MaterializedField field, BufferAllocator allocator) { this.field = Preconditions.checkNotNull(field, "field cannot be null"); this.allocator = Preconditions.checkNotNull(allocator, "allocator cannot be null"); }
@Override public int hashCode() { return Objects.hashCode(url, params); }
@Override public boolean isNull(int index){ Preconditions.checkElementIndex(index, valueCount); return true; }
SaslChallengeContext(SaslMessage challenge, UserGroupInformation ugi, C connection) { this.challenge = checkNotNull(challenge); this.ugi = checkNotNull(ugi); this.connection = checkNotNull(connection); } }
/** * Given a 0-based index relative to the current array, return an absolute offset * vector location for the array value. * * @param index 0-based index into the current array * @return absolute offset vector location for the array value */ @Override public int offset() { Preconditions.checkElementIndex(position, length); return startOffset + position; }
public CastExpression(LogicalExpression input, MajorType type, ExpressionPosition pos) { super(pos); this.input = input; this.type = checkNotNull(type, "Major type cannot be null"); }
protected AbstractContainerVector(MaterializedField field, BufferAllocator allocator, CallBack callBack) { this.field = Preconditions.checkNotNull(field); this.allocator = allocator; this.callBack = callBack; }
public ImmutableEntry(final K key, final V value) { this.key = Preconditions.checkNotNull(key, "key is required"); this.value = Preconditions.checkNotNull(value, "value is required"); }
public VectorDescriptor(final MaterializedField field) { this.field = Preconditions.checkNotNull(field, "field cannot be null"); }
/** * Initializes a builder for a {@link SubDirTestWatcher} with the given baseDir. * @param baseDir The baseDir is the parent directory in which all sub directories are created. */ public Builder(File baseDir) { this.baseDir = Preconditions.checkNotNull(baseDir); }
public NonClosableConnection(final Connection delegate) { this.delegate = Preconditions.checkNotNull(delegate, "delegate cannot be null"); }
public ConnectionInfo(String url, ImmutableMap<Object, Object> params) { this.url = Preconditions.checkNotNull(url, "URL cannot be null"); this.params = params; }