|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.yosokumo.core.Specimen
public class Specimen
A row of values. Other terminology that is sometimes used: An
observation, a record, an example, or an instance. These are
the primary characteristics of a Specimen
:
Cells
containing the values
of the row
Nested Class Summary | |
---|---|
static class |
Specimen.Status
Provides a logical delete facility. |
Constructor Summary | |
---|---|
Specimen(long key)
Initializes a newly created Specimen object with key specified
by the input parameter. |
|
Specimen(long key,
java.util.Collection<Cell> cells)
Initializes a newly created Specimen object with key and
cell sequence as specified by the input parameters. |
|
Specimen(long key,
Specimen.Status status,
long weight,
Value predictand,
java.util.Collection<Cell> cells)
Initializes a newly created Specimen object with attributes
specified by the input parameters. |
|
Specimen(long key,
Value predictand,
java.util.Collection<Cell> cells)
Initializes a newly created Specimen object with key,
predictand, and cell sequence as specified by the input parameters. |
Method Summary | |
---|---|
java.util.List<Cell> |
getCells()
Return all cells in the cell sequence as a List<Cell> . |
Value |
getPredictand()
Return the specimen predictand. |
long |
getSpecimenKey()
Return the specimen key. |
Specimen.Status |
getStatus()
Return the specimen status. |
long |
getWeight()
Return the specimen weight. |
boolean |
isEmpty()
Return true if the sequence contains no cells. |
void |
setCells(java.util.List<Cell> cells)
Set the cells of this Specimen to the cell list specified
by the parameter. |
void |
setPredictand(Value v)
Set the specimen predictand. |
void |
setSpecimenKey(long key)
Set the specimen key. |
void |
setStatus(Specimen.Status s)
Set the specimen status. |
void |
setWeight(long w)
Set the specimen weight. |
int |
size()
Return the number of cells in the sequence. |
java.lang.String |
toString()
Return a string representation of this Specimen . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Specimen(long key)
Specimen
object with key specified
by the input parameter. Other attributes are set to default values:
key
- the key of the specimen.public Specimen(long key, java.util.Collection<Cell> cells)
Specimen
object with key and
cell sequence as specified by the input parameters. Other attributes
are set to default values:
key
- the key of the specimen.cells
- the cell sequence of the specimen.public Specimen(long key, Value predictand, java.util.Collection<Cell> cells)
Specimen
object with key,
predictand, and cell sequence as specified by the input parameters.
Other attributes are set to default values:
key
- the key of the specimen.predictand
- the predictand of the specimen.cells
- the cell sequence of the specimen.public Specimen(long key, Specimen.Status status, long weight, Value predictand, java.util.Collection<Cell> cells)
Specimen
object with attributes
specified by the input parameters.
key
- the key of the specimen.status
- the status of the specimen.weight
- the weight of the specimen.predictand
- the predictand of the specimen.cells
- the cell sequence of the specimen.Method Detail |
---|
public void setSpecimenKey(long key)
key
- the key to assign to this specimen. This is the
unique identification of the specimen. It must be positive.public long getSpecimenKey()
public void setStatus(Specimen.Status s)
s
- the status to assign to this specimen.public Specimen.Status getStatus()
public void setWeight(long w)
w
- the weight to assign to this specimen.public long getWeight()
public void setPredictand(Value v)
v
- the predictand to assign to this specimen.public Value getPredictand()
public java.util.List<Cell> getCells()
List<Cell>
.
This makes it possible to iterate over all cells in the sequence
like this:
for (Cell c : cellSequence.getCells()) { process cell c }
public void setCells(java.util.List<Cell> cells)
Specimen
to the cell list specified
by the parameter.
cells
- a list of cells to assign to this Specimen
public int size()
public boolean isEmpty()
true
if the sequence contains no cells.
true
if the sequence contains no cells.
false
otherwise.public java.lang.String toString()
Specimen
.
toString
in class java.lang.Object
Specimen
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |