Package com.mckoi.database
Class FunctionTable.TableGroupResolver
- java.lang.Object
-
- com.mckoi.database.FunctionTable.TableGroupResolver
-
- All Implemented Interfaces:
GroupResolver
- Enclosing class:
- FunctionTable
final class FunctionTable.TableGroupResolver extends java.lang.Object implements GroupResolver
Group resolver. This is used to resolve group information in the refering table.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
FunctionTable.TableGroupResolver.TableGVResolver
-
Field Summary
Fields Modifier and Type Field Description private IntegerVector
group
The IntegerVector that represents the group we are currently processing.private int
group_number
The current group number.private FunctionTable.TableGroupResolver.TableGVResolver
tgv_resolver
A VariableResolver that can resolve variables within a set of a group.
-
Constructor Summary
Constructors Constructor Description TableGroupResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private FunctionTable.TableGroupResolver.TableGVResolver
createVariableResolver()
Creates a resolver that resolves variables within a set of the group.private void
ensureGroup()
Ensures that 'group' is set up.VariableResolver
getVariableResolver(int set_index)
Returns a VariableResolver that can be used to resolve variable in the get set of the group.int
groupID()
A number that uniquely identifies this group from all the others in the set of groups.TObject
resolve(Variable variable, int set_index)
Returns the value of a variable of a group.void
setUpGroupForRow(int row_index)
Given a row index, this will setup the information in this resolver to solve for this group.int
size()
The total number of set items in this group.
-
-
-
Field Detail
-
group
private IntegerVector group
The IntegerVector that represents the group we are currently processing.
-
group_number
private int group_number
The current group number.
-
tgv_resolver
private FunctionTable.TableGroupResolver.TableGVResolver tgv_resolver
A VariableResolver that can resolve variables within a set of a group.
-
-
Method Detail
-
createVariableResolver
private FunctionTable.TableGroupResolver.TableGVResolver createVariableResolver()
Creates a resolver that resolves variables within a set of the group.
-
ensureGroup
private void ensureGroup()
Ensures that 'group' is set up.
-
setUpGroupForRow
public void setUpGroupForRow(int row_index)
Given a row index, this will setup the information in this resolver to solve for this group.
-
groupID
public int groupID()
Description copied from interface:GroupResolver
A number that uniquely identifies this group from all the others in the set of groups.- Specified by:
groupID
in interfaceGroupResolver
-
size
public int size()
Description copied from interface:GroupResolver
The total number of set items in this group.- Specified by:
size
in interfaceGroupResolver
-
resolve
public TObject resolve(Variable variable, int set_index)
Description copied from interface:GroupResolver
Returns the value of a variable of a group. The set index signifies the set item of the group. For example, if the group contains 10 items, then set_index may be between 0 and 9. Return types must be either a String, BigDecimal or Boolean.- Specified by:
resolve
in interfaceGroupResolver
-
getVariableResolver
public VariableResolver getVariableResolver(int set_index)
Description copied from interface:GroupResolver
Returns a VariableResolver that can be used to resolve variable in the get set of the group. The object returned is undefined after the next call to this method.- Specified by:
getVariableResolver
in interfaceGroupResolver
-
-