/** * Creates a new field path entry that references a map or weighted set. * * @param lookupKey The value of the key in the map or weighted set to recurse into. * @param resultingDataType The datatype of values in the map or weighted set. * @return The new field path entry */ public static FieldPathEntry newMapLookupEntry(FieldValue lookupKey, DataType resultingDataType) { return new FieldPathEntry(lookupKey, resultingDataType); }
/** * Creates a new field path entry that digs through all the values of a map or weighted set. * * @param resultingDataType The datatype of the values in the map or weighted set. * @return The new field path entry. */ public static FieldPathEntry newAllValuesLookupEntry(DataType resultingDataType) { return new FieldPathEntry(false, true, resultingDataType); }
/** * Creates a new field path entry that references an array index. * * @param lookupIndex The index to look up * @param resultingDataType The datatype of the contents of the array * @return The new field path entry */ public static FieldPathEntry newArrayLookupEntry(int lookupIndex, DataType resultingDataType) { return new FieldPathEntry(lookupIndex, resultingDataType); }
/** * Creates a new field path entry that digs through all the keys of a map or weighted set. * * @param resultingDataType The datatype of the keys in the map or weighted set. * @return The new field path entry. */ public static FieldPathEntry newAllKeysLookupEntry(DataType resultingDataType) { return new FieldPathEntry(true, false, resultingDataType); }
/** * Creates a new field path entry that references a struct field. * For these kinds of field path entries, getFieldRef() is valid. * * @param fieldRef The field to look up in the struct. * @return The new field path entry */ public static FieldPathEntry newStructFieldEntry(Field fieldRef) { return new FieldPathEntry(fieldRef); }
/** * Creates a new field path entry that digs through all the keys in a map or weighted set, or all the indexes of an array, * an sets the given variable name as it does so (or, if the variable is set, uses the set variable to look up the * collection. * * @param variableName The name of the variable to lookup in the collection * @param resultingDataType The value type of the collection we're digging through * @return The new field path entry. */ public static FieldPathEntry newVariableLookupEntry(String variableName, DataType resultingDataType) { return new FieldPathEntry(variableName, resultingDataType); }