T
- Descriptor bare representationpublic class SerializingUnguardedExtractor<T extends Descriptor> extends Object implements UnguardedExtractor<T,byte[]>
DescriptorSerializer.toByteArray(com.chemaxon.descriptors.common.Descriptor)
and
DescriptorSerializer.fromByteArray(byte[])
serialization mechanism.Guarded.EnsureThat, Guarded.New
Constructor and Description |
---|
SerializingUnguardedExtractor(DescriptorSerializer<T> serializer)
Construct.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
apply(T input) |
boolean |
extractorIsEqualWith(UnguardedExtractor other)
Check strict equivalence of extractors.
|
Object |
getGuardObject()
Gets the guard object associated to the generated descriptors/utilities.
|
String |
toString() |
public SerializingUnguardedExtractor(DescriptorSerializer<T> serializer)
serializer
- Underlying generatorpublic byte[] apply(T input)
apply
in interface Function<T extends Descriptor,byte[]>
public Object getGuardObject()
Guarded
This method is intended to use only for ensuring the compatibility of manipulated objects.
Implementations might use the associated DescriptorGenerator
or DescriptorParameters
reference as
the guard object, however it is a non recommended practice to use this method to access the associated generator
to perform further operations on it.
getGuardObject
in interface Guarded
null
.public boolean extractorIsEqualWith(UnguardedExtractor other)
UnguardedExtractor
extractorIsEqualWith
in interface UnguardedExtractor<T extends Descriptor,byte[]>
other
- Other extractortrue
when and only when the two extractors (this
and other
) are the same thus
interchangeable. Implementations typically check class equivalence, guard object match and parameter match.