Package | Description |
---|---|
LectureExamples.allegory | |
Parsing.Parsers | |
PrologDB |
Constructor and Description |
---|
childrenOf_parentsOf(java.lang.String n,
Tuple t) |
childrenOf_parentsOf(Tuple t) |
Department(java.lang.String n,
Tuple t) |
Department(Tuple t) |
Division(java.lang.String n,
Tuple t) |
Division(Tuple t) |
employs_worksin(java.lang.String n,
Tuple t) |
employs_worksin(Tuple t) |
Person(java.lang.String n,
Tuple t) |
Person(Tuple t) |
Modifier and Type | Method and Description |
---|---|
static Tuple |
YumlLineParser.ParseAssociation(int lineno,
java.util.LinkedList<java.lang.String> list,
Table assoc) |
static Tuple |
YumlLineParser.ParseBox(int lineno,
java.util.LinkedList<java.lang.String> list,
Table box) |
Modifier and Type | Method and Description |
---|---|
Tuple |
Tuple.copy(TableSchema newSchema)
returns a (deep) copy of a tuple; precondition: newSchema and tableSchema
must have identically defined sets of columns; the schemas may have
different names
|
Tuple |
Tuple.copy(Tuple from)
copies all column values from tuple into 'this' tuple
|
Tuple |
Tuple.copy(Tuple from,
ColumnCorrespondence cor)
copies column values in 'from' tuple to 'this' tuple
|
Tuple |
Tuple.copy(Tuple from,
java.util.List<Column> columns)
copies selected column values from existing tuple
|
Tuple |
Table.getFirst(java.util.function.Predicate<Tuple> p)
return first tuple in table that satisfies predicate p
|
Tuple |
Table.getFirstEH(java.util.function.Predicate<Tuple> p)
return first tuple in table that satisfies predicate p
|
Tuple |
KeyedTable.getKey(java.lang.String keyValue)
returns the tuple with the given keyValue; null returned if no such
keyValue exists
|
Tuple |
KeyedTable.getKeyEH(java.lang.String keyValue)
Error Handling version of getKey; Error returned if no
such tuple exists
|
Tuple |
Tuple.joinFirst(java.lang.String leftJoinCol,
Table rightTable,
java.lang.String rightJoinCol)
returns the first tuple of rightTable that joins with 'this', where
"this".thisJoinkey == rightTable.rightJoinCol; returns null otherwise;
technically this is a rightSemiJoinFirst operation
|
Tuple |
Tuple.joinFirstEH(java.lang.String thisJoinKey,
Table otherTable,
java.lang.String otherJoinKey)
same as joinFirst, except an Error is thrown if no tuple of otherTable is
found.
|
static Tuple |
Tuple.parseTupleDecl(java.lang.String line,
int lineno,
TableSchema ts)
parses a line at lineno, expecting to parse a legal prolog tuple
declaration that conforms to table schema ts
|
Tuple |
Tuple.project(TableSchema superTableSchema)
projects 'this' tuple to the set of columns of a super table schema; if
table schemas do not match, tuple.getName() throws an Error projection
retains the first set of columns -- columns that are removed are at the
end of a tuple
|
Tuple |
Tuple.set(java.lang.String columnName,
boolean value)
sets a column with columnName to have the given boolean value
|
Tuple |
Tuple.set(java.lang.String columnName,
double value)
sets a column with columnName to have the given double value
|
Tuple |
Tuple.set(java.lang.String columnName,
float value)
sets a column with columnName to have the given float value
|
Tuple |
Tuple.set(java.lang.String columnName,
int value)
sets a column with columnName to have the given int value
|
Tuple |
Tuple.set(java.lang.String columnName,
java.lang.String value)
sets a column with columnName to have the given string value
|
Tuple |
Tuple.setNull(java.lang.String columnName)
sets a column with columnName to have "null" value
|
Tuple |
Tuple.setValues(java.lang.String... vals)
adds a list of values, in order in which their columns are defined, to an
empty tuple.
|
Tuple |
Tuple.setValues(Tuple t)
Add the (column,value) pairs of tuple t to the existing tuple.
|
Modifier and Type | Method and Description |
---|---|
java.util.function.BiConsumer<TupleList,Tuple> |
toTable.accumulator() |
java.util.stream.Stream<Tuple> |
Table.stream()
convert table into a stream of Tuples
|
Modifier and Type | Method and Description |
---|---|
Table |
Table.add(Tuple t)
adds tuple t to 'this' table; throws error the schema of the tuple does
not match the schema of the table to which it is being added Untested
precondition: that the schema of the tuple conforms to the schema of the
table
|
void |
Unique.add(Tuple t)
register the content of a tuple: get its id col, column value,
and see if the column value has been seen before; if so, register
an error with the error report object.
|
void |
Unique.add(Tuple t,
java.lang.String colValue)
add tuple t whose column is "computed" to be colValue
|
boolean |
Table.contains(Tuple t)
does 'this' table contain tuple t?
|
Tuple |
Tuple.copy(Tuple from)
copies all column values from tuple into 'this' tuple
|
Tuple |
Tuple.copy(Tuple from,
ColumnCorrespondence cor)
copies column values in 'from' tuple to 'this' tuple
|
Tuple |
Tuple.copy(Tuple from,
java.util.List<Column> columns)
copies selected column values from existing tuple
|
boolean |
Tuple.equals(Tuple t)
does 'this' tuple equal the given tuple requires 'this' and given tuple
to belong to the same schema and have the same column values
|
boolean |
Tuple.hasSameValuesAs(Tuple t)
are all (col,val) pairs in 'this' tuple also in the given tuple?
|
Tuple |
Tuple.setValues(Tuple t)
Add the (column,value) pairs of tuple t to the existing tuple.
|
Modifier and Type | Method and Description |
---|---|
ColumnCorrespondence |
ColumnCorrespondence.add(java.lang.String left,
java.util.function.Function<Tuple,java.lang.String> fun) |
boolean |
Table.allMatch(java.util.function.Predicate<Tuple> pred)
all tuples in 'this' table must satisfy pred
|
boolean |
Table.anyMatch(java.util.function.Predicate<Tuple> pred)
at least one tuple in 'this' table must satisfy pred
|
boolean |
Table.exists(java.util.function.Predicate<Tuple> p)
does 'this' table have a tuple that satisfies the given predicate
|
Table |
Table.filter(java.util.function.Predicate<Tuple> p)
return a Table from a given Table that satisfies predicate p
|
static void |
Constraints.findBad(Table t,
java.util.function.Predicate<Tuple> ifpred,
java.lang.String expl,
ErrorReport er)
findBad -- find all tuples in table t that do NOT satisfy ifpred
|
void |
Table.forEach(java.util.function.Consumer<Tuple> action)
works like forEach stream, except it takes in a table
|
Tuple |
Table.getFirst(java.util.function.Predicate<Tuple> p)
return first tuple in table that satisfies predicate p
|
Tuple |
Table.getFirstEH(java.util.function.Predicate<Tuple> p)
return first tuple in table that satisfies predicate p
|
static void |
Constraints.iftest(Table t,
java.util.function.Predicate<Tuple> ifpred,
java.lang.String expl,
ErrorReport er)
ifpred -- then error
|
static void |
Constraints.implies(Table t,
java.util.function.Predicate<Tuple> ifpred,
java.util.function.Predicate<Tuple> thenpred,
java.lang.String expl,
ErrorReport er)
implies: ifpred implies thenpred; violations are reported in error
reporter
|
static void |
Constraints.implies(Table t,
java.util.function.Predicate<Tuple> ifpred,
java.util.function.Predicate<Tuple> thenpred,
java.lang.String expl,
ErrorReport er)
implies: ifpred implies thenpred; violations are reported in error
reporter
|
static void |
Constraints.isLegit(Table t,
java.lang.String column2r,
Table r,
java.lang.String columnrid,
ErrorReport er,
java.util.function.Function<Tuple,java.lang.String> emsg) |
ColumnCorrespondence |
ColumnCorrespondence.replace(java.lang.String left,
java.util.function.Function<Tuple,java.lang.String> fun) |
Constructor and Description |
---|
Pair(java.lang.String left,
java.util.function.Function<Tuple,java.lang.String> fun) |