public final class CompoundValue extends de.toem.impulse.samples.convert.ConvertedMembers implements IReadableSample, IReadableMembers, Cloneable
ACCURACY_DEFAULT, AT_ANY, AT_ASSOC, AT_ASSOC_DELTA, AT_ASSOC_DELTA_REV, AT_ASSOC_POS, AT_ASSOC_POS_REV, AT_LABEL, AT_MULT, AT_RELATION, CONTENT_CHART, CONTENT_DEFAULT, CONTENT_EVENT, CONTENT_EVENTPARM, CONTENT_GANTT, CONTENT_IMAGE, CONTENT_LABEL, CONTENT_LOG, CONTENT_STATE, CONTENT_TRANSACTION, COUNT_FORMATS, DEFAULT_PLUS_LENGTH, DF_BINARY, DF_ENUM_EVENT, DF_EVENT, DF_FLOAT, DF_INTEGER, DF_LOGIC_16, DF_LOGIC_2, DF_LOGIC_4, DF_NONE, DF_STRUCT, DF_TEXT, ENUM_ASSOC_DOMAINBASE, ENUM_ASSOC_STYLE, ENUM_ASSOC_TARGET, ENUM_GLOBAL, ENUM_LABEL_STYLE, ENUM_MAX, ENUM_MEMBER_0, ENUM_MIN, FLOAT_ACCURACY_32, FLOAT_ACCURACY_64, FLOAT_ACCURACY_BIG, FLOAT_ACCURACY_DEFAULT, FORMAT_ASCII, FORMAT_BINARY, FORMAT_BOOLEAN, FORMAT_COLLECTION_DEFAULT, FORMAT_COLLECTION_KEY_VALUES, FORMAT_COLLECTION_MASK, FORMAT_COLLECTION_MEMBER_0, FORMAT_COLLECTION_MEMBER_1, FORMAT_COLLECTION_MEMBER_2, FORMAT_COLLECTION_MEMBER_3, FORMAT_COLLECTION_VALUES_ONLY, FORMAT_DECIMAL, FORMAT_DECIMAL_F_MAX, FORMAT_DECIMAL_F_MIN, FORMAT_DECIMAL_F0, FORMAT_DECIMAL_F1, FORMAT_DECIMAL_F2, FORMAT_DECIMAL_F3, FORMAT_DECIMAL_F4, FORMAT_DECIMAL_F5, FORMAT_DECIMAL_F6, FORMAT_DECIMAL_F7, FORMAT_DEFAULT, FORMAT_DELTA_DOMAIN, FORMAT_DELTA_VALUE, FORMAT_EVENT, FORMAT_GROUP_INDEX, FORMAT_GROUP_ORDER, FORMAT_HEXADECIMAL, FORMAT_INDEX, FORMAT_MEMBER_0, FORMAT_MEMBER_1, FORMAT_NONE, FORMAT_OCTAL, FORMAT_R4, FORMAT_R5, FORMAT_R6, FORMAT_R7, FORMAT_R8, FORMAT_RELATION_MAX, FORMAT_RELATION_MIN, FORMAT_SIMPLE_MAX, FORMAT_SIMPLE_MIN, FORMAT_SL_TEXT, FORMAT_TEXT, FORMAT_VALUE_DEFAULT, FORMAT_VALUE_MASK, formatCollectionLabels, formatCollectionOptions, formatValueLabels, formatValueOptions, GO_FIRST, GO_INTER, GO_LAST, GO_NONE, GROUP_ORDER_LABELS, INTEGER_ACCURACY_32, INTEGER_ACCURACY_64, INTEGER_ACCURACY_BIG, INTEGER_ACCURACY_DEFAULT, LOGIC_L16_BYTE_FILL, LOGIC_L2_BYTE_FILL, LOGIC_L4_BYTE_FILL, LOGIC_PACK_0, LOGIC_PACK_1, LOGIC_PACK_RIGHT_ALLIGNED, MASK_FORMAT_0_A, MASK_FORMAT_0_AT, MASK_FORMAT_0_DF, MASK_FORMAT_0_GO, MASK_FORMAT_0_N, MASK_FORMAT_0_T, MASK_FORMAT_0_XDF, MASK_FORMAT_1_S0, MASK_FORMAT_1_S0_PLUS, MASK_FORMAT_1_TF, MASK_PLUS, MASK_PLUS_DATA, MAX_DATA, MAX_LAYERS, MAX_SAMPLE_SIZE, MAX_SCALE, SHIFT_FORMAT_0_D, SHIFT_FORMAT_0_DF, SHIFT_FORMAT_0_GO, SHIFT_FORMAT_0_XDF, SHIFT_FORMAT_1_TF, STATE_0_BITS, STATE_1_BITS, STATE_D_BITS, STATE_H_BITS, STATE_J_BITS, STATE_K_BITS, STATE_L_BITS, STATE_LC_DIGITS, STATE_LEVEL_16, STATE_LEVEL_2, STATE_LEVEL_4, STATE_LEVEL_NONE, STATE_M_BITS, STATE_N_BITS, STATE_O_BITS, STATE_P_BITS, STATE_U_BITS, STATE_UC_DIGITS, STATE_UNKNOWN_BITS, STATE_W_BITS, STATE_X_BITS, STATE_Z_BITS, STRUCT_MASK_TYPE, STRUCT_MOD_HIDDEN, STRUCT_MOD_VALID_UNTIL_CHANGE, STRUCT_TYPE_BINARY, STRUCT_TYPE_BOOLEAN, STRUCT_TYPE_ENUM, STRUCT_TYPE_FLOAT, STRUCT_TYPE_INTEGER, STRUCT_TYPE_LOCAL_ENUM, STRUCT_TYPE_MAX, STRUCT_TYPE_MERGE_ENUM, STRUCT_TYPE_STRUCT, STRUCT_TYPE_TEXT, STRUCT_TYPE_UNKNOWN, UF_ABSOLUTE_8, UF_DELTA_0, UF_DELTA_1, UF_DELTA_2, UF_DELTA_4, UF_DELTA_8, UF_DELTA_PREVIOUS, XDF_FLOAT_32, XDF_FLOAT_64, XDF_FLOAT_BIG, XDF_FLOAT_DEFAULT, XDF_INTEGER_32, XDF_INTEGER_64, XDF_INTEGER_BIG, XDF_INTEGER_DEFAULT, XDF_LOGIC_PACK_0, XDF_LOGIC_PACK_1, XDF_LOGIC_PACK_RIGHT_ALLIGNED, XDF_NONE
Constructor and Description |
---|
CompoundValue(IReadableSamples samples,
int idx,
long units,
boolean none,
boolean tagged,
int group,
int order,
int layer,
Object value,
java.util.List<IAttachment> attachments)
Creates a new event.
|
CompoundValue(IReadableSamples samples,
int idx,
long units,
boolean none,
boolean tagged,
Object value)
Creates a new event.
|
CompoundValue(IReadableSamples samples,
Object value)
Creates a new event.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<IAttachment> |
attachments(int type)
Returns all attachments of sample.
|
Object |
clone()
Creates and returns a copy of this object.
|
CompoundValue |
compound()
Returns value and and all surrounding informations, like position, group, order, layer and index.
|
CompoundValue |
compound(boolean atchments)
Returns value and and all surrounding informations, like position, group, order, layer and index.
|
int |
defaultFormat()
Returns the default format ( ISample.FORMAT_...).
|
int |
defaultFormatOf(Object memberIdentifier)
Returns the default format of member 'member'.
|
IMemberDescriptor |
descriptorOf(Object memberIdentifier)
Returns true if value has a member named 'member'.
|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
boolean |
equalValues(CompoundValue that) |
String |
format(int format)
Formats the current sample using format 'format'.
|
String |
formatOf(Object memberIdentifer,
int format)
Format value of member 'member' using format 'format'.
|
de.toem.impulse.samples.convert.SampleConverterConfiguration |
getConverterConfiguration() |
int |
getGroup()
Returns the group id of the event
|
int |
getIndex()
Returns the index of the event.
|
int |
getLayer() |
int |
getOrder()
Returns the order of the event
|
DomainValue |
getPosition()
Returns the position of the event.
|
IReadableSamples |
getSamples()
Returns the source samples.
|
long |
getUnits()
Returns the position of the event.
|
boolean |
hasMember(Object memberIdentifier)
Returns true if value has a member named 'member'.
|
int |
idOf(int memberIndex)
Returns the member id of the member at index 'memberIndex'
|
int |
indexOf(Object memberIdentifier)
Returns the member index of the member with identifier 'memberIdentifier'
|
boolean |
isConflict()
Deprecated.
|
boolean |
isNone()
Returns true if current sample is 'none'.
|
boolean |
isTagged()
Returns true if current sample is 'tagged'.
|
java.util.List<Object> |
membersWithContent(String content)
Returns the member identifier of the first member providing content 'content'.
|
String |
nameOf(int memberIndex)
Returns the name of member at index 'memberIndex'
|
int |
noOfMembers()
Returns the number of members.
|
CompoundPack |
packed()
Returns sample value in packed form and and all surrounding informations, like position, group, order, layer and index.
|
void |
setAttachments(java.util.List<IAttachment> attachments) |
void |
setConverterConfiguration(de.toem.impulse.samples.convert.SampleConverterConfiguration config) |
void |
setGroup(int group) |
void |
setIdx(int idx) |
void |
setLayer(int layer) |
void |
setNone(boolean none) |
void |
setOrder(int order) |
void |
setSamples(IReadableSamples samples)
Sets the source samples (internal only).
|
void |
setTagged(boolean tagged) |
void |
setUnits(long units) |
void |
setValue(Object value) |
Object |
val()
Returns the current raw (no interpretation or conversion) sample value.
|
Object |
valueOf(Object memberIdentifier)
Returns the raw (no interpretation or conversion) sample value of member 'member'.
|
bigDecimalValueOf, bigIntValueOf, booleanValueOf, bytesValueOf, doubleValueOf, enumValueOf, fasciiOf, fbinOf, fdecOf, fhexOf, floatValueOf, foctOf, intValueOf, isHighOf, isHighOf, isLowOf, isLowOf, logicStateOf, logicValueOf, longValueOf, numberValueOf, stringValueOf
bigDecimalValue, bigIntValue, bytesValue, doubleValue, enumValue, fascii, fbin, fdec, fhex, floatValue, foct, format, intValue, isGroup, isHigh, isHigh, isLow, isLow, isSample, logicState, logicValue, longValue, numberValue, stringValue, structValue
bigDecimalValue, bigIntValue, booleanValue, bytesValue, charValue, createConverterConfiguration, doubleValue, enumValue, floatValue, format, formatValueExampleOptions, formatValueOptions, getDefaultFormat, getDefaultValue, getFormatLabel, intValue, isHigh, isLow, logicState, logicValue, longValue, numberValue, parseFormatText, stringValue, stringValue, structValue
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bigDecimalValue, bigIntValue, bytesValue, doubleValue, enumValue, fascii, fbin, fdec, fhex, floatValue, foct, intValue, isHigh, isHigh, isLow, isLow, logicState, logicValue, longValue, numberValue, stringValue, structValue
isGroup, isSample
bigDecimalValueOf, bigIntValueOf, booleanValueOf, bytesValueOf, doubleValueOf, enumValueOf, fasciiOf, fbinOf, fdecOf, fhexOf, floatValueOf, foctOf, intValueOf, isHighOf, isLowOf, logicStateOf, logicValueOf, longValueOf, numberValueOf, stringValueOf
public CompoundValue(IReadableSamples samples, int idx, long units, boolean none, boolean tagged, int group, int order, int layer, Object value, java.util.List<IAttachment> attachments)
idx
- units
- group
- order
- layer
- public CompoundValue(IReadableSamples samples, int idx, long units, boolean none, boolean tagged, Object value)
idx
- units
- public CompoundValue(IReadableSamples samples, Object value)
samples
- value
- public boolean equals(Object o)
Object
The equals
method implements an equivalence relation
on non-null object references:
x
, x.equals(x)
should return
true
.
x
and y
, x.equals(y)
should return true
if and only if
y.equals(x)
returns true
.
x
, y
, and z
, if
x.equals(y)
returns true
and
y.equals(z)
returns true
, then
x.equals(z)
should return true
.
x
and y
, multiple invocations of
x.equals(y)
consistently return true
or consistently return false
, provided no
information used in equals
comparisons on the
objects is modified.
x
,
x.equals(null)
should return false
.
The equals
method for class Object
implements
the most discriminating possible equivalence relation on objects;
that is, for any non-null reference values x
and
y
, this method returns true
if and only
if x
and y
refer to the same object
(x == y
has the value true
).
Note that it is generally necessary to override the hashCode
method whenever this method is overridden, so as to maintain the
general contract for the hashCode
method, which states
that equal objects must have equal hash codes.
equals
in class Object
o
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.Object.hashCode()
,
HashMap
public boolean equalValues(CompoundValue that)
public de.toem.impulse.samples.convert.SampleConverterConfiguration getConverterConfiguration()
getConverterConfiguration
in interface ISampleConverter
getConverterConfiguration
in class de.toem.impulse.samples.convert.SampleConverter
public void setConverterConfiguration(de.toem.impulse.samples.convert.SampleConverterConfiguration config)
public void setSamples(IReadableSamples samples)
samples
- public IReadableSamples getSamples()
public void setValue(Object value)
public void setIdx(int idx)
public void setUnits(long units)
public void setTagged(boolean tagged)
public void setNone(boolean none)
public void setOrder(int order)
public void setGroup(int group)
public void setLayer(int layer)
public void setAttachments(java.util.List<IAttachment> attachments)
public int getIndex()
IReadableSample
getIndex
in interface IReadableSample
getIndex
in interface IReadableValue
public long getUnits()
IReadableSample
getUnits
in interface IReadableSample
getUnits
in interface IReadableValue
public DomainValue getPosition()
IReadableSample
getPosition
in interface IReadableSample
getPosition
in interface IReadableValue
public int getOrder()
IReadableSample
getOrder
in interface IReadableSample
public int getGroup()
IReadableSample
getGroup
in interface IReadableSample
getGroup
in interface IReadableValue
public int getLayer()
public Object val()
IReadableSample
val
in interface IReadableSample
val
in class de.toem.impulse.samples.convert.ConvertedSample
public CompoundValue compound()
IReadableSample
compound
in interface IReadableSample
public CompoundValue compound(boolean atchments)
IReadableSample
compound
in interface IReadableSample
atchments
- Include attachments if truepublic CompoundPack packed()
IReadableSample
packed
in interface IReadableSample
public java.util.List<IAttachment> attachments(int type)
IReadableSample
attachments
in interface IReadableSample
attachments
in interface IReadableValue
public boolean isNone()
IReadableSample
isNone
in interface IReadableSample
@Deprecated public boolean isConflict()
IReadableSample
isConflict
in interface IReadableSample
public boolean isTagged()
IReadableSample
isTagged
in interface IReadableSample
isTagged
in interface IReadableValue
public int noOfMembers()
IReadableMembers
noOfMembers
in interface IReadableMembers
public String nameOf(int memberIndex)
IReadableMembers
nameOf
in interface IReadableMembers
public int idOf(int memberIndex)
IReadableMembers
idOf
in interface IReadableMembers
public int indexOf(Object memberIdentifier)
IReadableMembers
indexOf
in interface IReadableMembers
memberIdentifier
- Member identifier (see below).
Member identifier may be one of:
String name
Integer memberId
Arrays: memberId==memberIndex
Struct: memberId!=memberIndexpublic java.util.List<Object> membersWithContent(String content)
IReadableMembers
membersWithContent
in interface IReadableMembers
content
- Member identifier may be one of:
String name
Integer memberId
Arrays: memberId==memberIndex
Struct: memberId!=memberIndexpublic IMemberDescriptor descriptorOf(Object memberIdentifier)
IReadableMembers
descriptorOf
in interface IReadableMembers
public boolean hasMember(Object memberIdentifier)
IReadableMembers
hasMember
in interface IReadableMembers
memberIdentifier
- Member identifier (see below).
Member identifier may be one of:
String name
Integer memberId
Arrays: memberId==memberIndex
Struct: memberId!=memberIndexpublic Object valueOf(Object memberIdentifier)
IReadableMembers
valueOf
in interface IReadableMembers
valueOf
in class de.toem.impulse.samples.convert.ConvertedMembers
public String format(int format)
IReadableSample
format
in interface IReadableSample
format
in interface IReadableValue
format
in class de.toem.impulse.samples.convert.ConvertedSample
format
- Format specifier as defined in ISample.FORMAT_.. (e.g. ISample.FORMAT_HEXADECIMAL)public int defaultFormat()
IReadableSample
defaultFormat
in interface IReadableSample
defaultFormat
in class de.toem.impulse.samples.convert.ConvertedSample
public String formatOf(Object memberIdentifer, int format)
IReadableMembers
formatOf
in interface IReadableMembers
formatOf
in class de.toem.impulse.samples.convert.ConvertedMembers
memberIdentifer
- Member identifier (see below).format
- Format specifier as defined in ISample.FORMAT_.. (e.g. ISample.FORMAT_HEXADECIMAL)
Member identifier may be one of:
String name
Integer memberId
Arrays: memberId==memberIndex
Struct: memberId!=memberIndexpublic int defaultFormatOf(Object memberIdentifier)
IReadableMembers
defaultFormatOf
in interface IReadableMembers
defaultFormatOf
in class de.toem.impulse.samples.convert.ConvertedMembers
memberIdentifier
- Member identifier (see below).
Member identifier may be one of:
String name
Integer memberId
Arrays: memberId==memberIndex
Struct: memberId!=memberIndexpublic Object clone() throws CloneNotSupportedException
Object
x
, the expression:
will be true, and that the expression:x.clone() != x
will bex.clone().getClass() == x.getClass()
true
, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x)
true
, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
super.clone
. If a class and all of its superclasses (except
Object
) obey this convention, it will be the case that
x.clone().getClass() == x.getClass()
.
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by super.clone
before returning it. Typically, this means
copying any mutable objects that comprise the internal "deep structure"
of the object being cloned and replacing the references to these
objects with references to the copies. If a class contains only
primitive fields or references to immutable objects, then it is usually
the case that no fields in the object returned by super.clone
need to be modified.
The method clone
for class Object
performs a
specific cloning operation. First, if the class of this object does
not implement the interface Cloneable
, then a
CloneNotSupportedException
is thrown. Note that all arrays
are considered to implement the interface Cloneable
and that
the return type of the clone
method of an array type T[]
is T[]
where T is any reference or primitive type.
Otherwise, this method creates a new instance of the class of this
object and initializes all its fields with exactly the contents of
the corresponding fields of this object, as if by assignment; the
contents of the fields are not themselves cloned. Thus, this method
performs a "shallow copy" of this object, not a "deep copy" operation.
The class Object
does not itself implement the interface
Cloneable
, so calling the clone
method on an object
whose class is Object
will result in throwing an
exception at run time.
CloneNotSupportedException
- if the object's class does not
support the Cloneable
interface. Subclasses
that override the clone
method can also
throw this exception to indicate that an instance cannot
be cloned.Cloneable