public abstract class Sample extends Object implements Serializable
Simon.sample()
and Simon.sampleIncrement(Object)
methods.
Returned object contains consistent set of Simon values as both operations are synchronized.
However Sample is a Java Bean and it can be modified afterwards so no consistency is guaranteed
when the object is used in an inappropriate context. As a Java Bean object can be
used directly as the data transfer object without need to create another DTO with the same data.
Sample generally doesn't have any behavior.Constructor and Description |
---|
Sample() |
Modifier and Type | Method and Description |
---|---|
long |
getFirstUsage()
Timestamp of the first usage from the sampled Simon.
|
long |
getLastUsage()
Timestamp of the last usage from the sampled Simon.
|
String |
getName()
Name of the sampled Simon.
|
String |
getNote()
Note from the sampled Simon.
|
void |
setFirstUsage(long firstUsage)
Sets the timestamp of the first usage from the sampled Simon.
|
void |
setLastUsage(long lastUsage)
Sets the timestamp of the last usage from the sampled Simon.
|
void |
setName(String name)
Sets the name of the sampled Simon - mostly not used directly.
|
void |
setNote(String note)
Sets the note for the sample, typically note from the sampled Simon.
|
abstract String |
simonToString()
Similar to
AbstractSimon.toString() except for the state missing in the output. |
public Sample()
public final void setName(String name)
name
- Simon's namepublic final void setNote(String note)
note
- Simon's notepublic long getFirstUsage()
public void setFirstUsage(long firstUsage)
firstUsage
- Simon's first usage timestamppublic long getLastUsage()
public void setLastUsage(long lastUsage)
lastUsage
- Simon's last usage timestamppublic abstract String simonToString()
AbstractSimon.toString()
except for the state missing in the output.Copyright © 2019. All rights reserved.