public class RequiredFields extends Object
Constructor and Description |
---|
RequiredFields(boolean needAllFields) |
RequiredFields(boolean needAllFields,
boolean needNoFields) |
RequiredFields(List<Pair<Integer,Integer>> fields) |
Modifier and Type | Method and Description |
---|---|
Pair<Integer,Integer> |
getField(int i) |
List<Pair<Integer,Integer>> |
getFields() |
MapKeysInfo |
getMapKeysInfo(int i)
Get the ith MapKeysInfo structure
|
boolean |
getNeedAllFields() |
boolean |
getNeedNoFields() |
void |
merge(RequiredFields r2)
Merge with RequiredFields r2.
|
void |
mergeMapKey(int input,
int column,
String key)
Merge another map key into existing required map keys list
|
void |
mergeMapKeysInfo(int input,
int column,
MapKeysInfo mapKeysInfo)
Merge a MapKeysInfo structure to existing required map keys list
|
boolean |
needAllFields() |
boolean |
needNoFields() |
void |
reIndex(int i)
Set the index of all fields to i
|
void |
setFields(List<Pair<Integer,Integer>> fields) |
void |
setMapKeysInfo(int input,
int column,
MapKeysInfo mapKeysInfo)
Set a MapKeysInfo structure to the required map keys list
|
void |
setMapKeysInfo(int i,
MapKeysInfo mapKeysInfo)
Set the ith MapKeysInfo structure
|
void |
setNeedAllFields(boolean needAllFields) |
void |
setNeedNoFields(boolean needNoFields) |
int |
size() |
String |
toString() |
public RequiredFields(boolean needAllFields)
needAllFields
- to indicate if this required fields needs all the fields from
its inputpublic RequiredFields(boolean needAllFields, boolean needNoFields)
needAllFields
- to indicate if this required fields needs no fields from
its inputpublic List<Pair<Integer,Integer>> getFields()
public Pair<Integer,Integer> getField(int i)
i
- the index of the required fieldpublic int size()
public void setFields(List<Pair<Integer,Integer>> fields)
fields
- the list of input columns that are requiredpublic boolean needAllFields()
public boolean getNeedAllFields()
public void setNeedAllFields(boolean needAllFields)
needAllFields
- to indicate if this required fields needs all the fields from
its input; cannot be true if needNoFields() is truepublic boolean needNoFields()
public boolean getNeedNoFields()
public void setNeedNoFields(boolean needNoFields)
needNoFields
- to indicate if this required fields needs no fields from
its input; cannot be true if needAllFields() is truepublic void merge(RequiredFields r2)
r2
- Required fields to mergepublic void reIndex(int i)
i
- New index to setpublic void mergeMapKey(int input, int column, String key)
input
- The input of the field to mergecolumn
- The column of the field to mergekey
- The key to mergepublic void mergeMapKeysInfo(int input, int column, MapKeysInfo mapKeysInfo)
input
- The input of the field to mergecolumn
- The column of the field to mergemapKeysInfo
- The MapKeysInfo structure to mergepublic void setMapKeysInfo(int input, int column, MapKeysInfo mapKeysInfo)
input
- The input of the field to setcolumn
- The column of the field to setmapKeysInfo
- The MapKeysInfo structure to setpublic MapKeysInfo getMapKeysInfo(int i)
i
- The index of the MapKeysInfo, the index of MapKeysInfo is synchronized with mFieldspublic void setMapKeysInfo(int i, MapKeysInfo mapKeysInfo)
i
- The index of the MapKeysInfo, the index of MapKeysInfo is synchronized with mFieldsmapKeysInfo
- The MapKeysInfo to setCopyright © 2007-2012 The Apache Software Foundation