|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.data.DataColumnDomain
public final class DataColumnDomain
Final DataColumnDomain
object holding meta infos about one
column, that are, possible values and/or upper and lower bounds - if
available. This object can only be created by a
DataColumnDomainCreator
within this package. The
DataColumnDomain
is read-only.
Note: It is assumed that the domain - if available - contains reliable data.
It is crucial that the creator of a column domain ensures that no value in
the data table is outside the provided bounds and no other value appears in
that column than the values listed in the set returned by
getValues()
. If you are not sure about the data to come in your
column, don't provide domain infos (null
).
Also noteworthy: domain information describes the source of the data (the
domain), not the data itself. I.e. the created domain object could contain
more possible values than actually appear in the data table, or a range
bigger than needed for the data in that particular data table. But it must
always include all values appearing in the table.
DataColumnDomainCreator
Constructor Summary | |
---|---|
DataColumnDomain(DataCell lower,
DataCell upper,
Set<DataCell> values)
Create new column domain with lower and upper bounds, and set of possible values. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Compares this domain with the other one by the possible values and lower and upper bounds and returns true if both are the same. |
DataCell |
getLowerBound()
Return the lower bound of the domain of this column, if available. |
DataCell |
getUpperBound()
Return the upper bound of the domain of this column, if available. |
Set<DataCell> |
getValues()
Returns all possible values in this column. |
boolean |
hasBounds()
Returns true if both, lower and upper bound, are defined. |
int |
hashCode()
Returns the hash code of this domain, based on the hash codes of the lower, upper bound, and each possible value - if available. |
boolean |
hasLowerBound()
Returns true , if a lower bound is defined. |
boolean |
hasUpperBound()
Returns true , if an upper bound is defined. |
boolean |
hasValues()
Returns true if the values are not null . |
static DataColumnDomain |
load(ConfigRO config)
Reads lower and upper bounds as well as the possible values - if available - from ConfigRO . |
void |
save(ConfigWO config)
Save this domain to the given ConfigWO including lower and upper
bound, and possible values or null - if not available. |
String |
toString()
Returns string representation of this domain including lower and upper bounds, and possible values. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
DataColumnDomain(DataCell lower, DataCell upper, Set<DataCell> values)
null
in case none of these
properties are available.
lower
- the lower bound value or null
upper
- the upper bound value or null
values
- a set of nominal values or null
Method Detail |
---|
public Set<DataCell> getValues()
null
if this information is not available (for continuous
double values, for example) and that the DataCell
s in the
returned set do not have to be of the same type (but the column type
should be compatible to all of their values).
If the returned set is not null
, the corresponding column
does not contain any value other than the ones contained in the set. The
set can contain a superset of the values in the table though.
Set
of possible DataCell
values or
null
hasValues()
public boolean hasValues()
true
if the values are not null
.
true
, if this column has possible values defined (
i.e. the getValues()
method returns a non-null set)getValues()
public DataCell getLowerBound()
DataTable
but it is describing the range of the
domain of this attribute.
Usually this value is compatible with type DoubleValue
corresponding to an numeric left interval border.
DataCell
with the lowest possible value or
null
hasLowerBound()
public boolean hasLowerBound()
true
, if a lower bound is defined.
true
, if the lower bound value has been definedgetLowerBound()
public DataCell getUpperBound()
DataTable
but it describes the range of the domain
of this attribute.
Usually this value is compatible with type DoubleValue
corresponding to an numeric right interval border.
DataCell
with the largest possible value or
null
hasUpperBound()
public boolean hasUpperBound()
true
, if an upper bound is defined.
true
, if the upper bound value has been definedgetUpperBound()
public boolean hasBounds()
true
if both, lower and upper bound, are defined.
true
, if lower and upper bound are definedpublic boolean equals(Object obj)
true
if both are the same.
equals
in class Object
obj
- The other domain to compare with.
true
if all possible values, and lower and upper
bounds are the sameSet.equals(Object)
,
DataCell.equals(Object)
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
Object.toString()
public void save(ConfigWO config)
ConfigWO
including lower and upper
bound, and possible values or null - if not available.
config
- the ConfigWO
to write intopublic static DataColumnDomain load(ConfigRO config)
ConfigRO
.
config
- to read entries from
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |