@Internal public abstract class FieldAccessor<T,F> extends Object implements Serializable
Field expressions that specify nested fields (e.g. "f1.a.foo") result in nested field accessors. These penetrate one layer, and then delegate the rest of the work to an "innerAccessor". (see PojoFieldAccessor, RecursiveTupleFieldAccessor, RecursiveProductFieldAccessor)
限定符和类型 | 字段和说明 |
---|---|
protected org.apache.flink.api.common.typeinfo.TypeInformation |
fieldType |
构造器和说明 |
---|
FieldAccessor() |
限定符和类型 | 方法和说明 |
---|---|
abstract F |
get(T record)
Gets the value of the field (specified in the constructor) of the given record.
|
org.apache.flink.api.common.typeinfo.TypeInformation<F> |
getFieldType()
Gets the TypeInformation for the type of the field.
|
abstract T |
set(T record,
F fieldValue)
Sets the field (specified in the constructor) of the given record to the given value.
|
public org.apache.flink.api.common.typeinfo.TypeInformation<F> getFieldType()
public abstract F get(T record)
record
- The record on which the field will be accessedpublic abstract T set(T record, F fieldValue)
Warning: This might modify the original object, or might return a new object instance. (This is necessary, because the record might be immutable.)
record
- The record to modifyfieldValue
- The new value of the fieldCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.