jklustor-all-api-0.0.7-20140619012755 (ChemAxon)


com.chemaxon.descriptors.alignment
Class AbstractShapeGenerator<D extends ShapeDescriptor,P extends AbstractShapeGeneratorParameter>

Object
  extended by com.chemaxon.descriptors.alignment.AbstractShapeGenerator<D,P>
Type Parameters:
D -
P -
All Implemented Interfaces:
DescriptorGenerator<D>, Serializable

@Beta
public abstract class AbstractShapeGenerator<D extends ShapeDescriptor,P extends AbstractShapeGeneratorParameter>
extends Object
implements DescriptorGenerator<D>

Author:
Adrian Kalaszi
See Also:
Serialized Form

Field Summary
protected  P parameters
           
 
Constructor Summary
AbstractShapeGenerator(P parameters)
           
 
Method Summary
 boolean equals(Object obj)
           
 D fromString(String desc)
          Builds a descriptor from its string representation.
 D getBareDescriptor(D descriptor)
          Get bare-only form of a descriptor.
 Object getGuardObject()
          Gets the guard object.
 P getParameters()
          Gets the parameter class.
 int hashCode()
           
 byte[] toByteArray(D desc)
          Creates the byte array representation of a descriptor object.
 String toString()
           
 String toString(D desc)
          Creates the String representation of a descriptor object.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.chemaxon.descriptors.common.DescriptorGenerator
fromByteArray, generateDescriptor, getDefaultComparator
 

Field Detail

parameters

protected final P extends AbstractShapeGeneratorParameter parameters
Constructor Detail

AbstractShapeGenerator

public AbstractShapeGenerator(P parameters)
Method Detail

toByteArray

public byte[] toByteArray(D desc)
Description copied from interface: DescriptorGenerator
Creates the byte array representation of a descriptor object.

The descriptors bare form can be reconstructed using DescriptorGenerator.fromByteArray(byte[]).

Specified by:
toByteArray in interface DescriptorGenerator<D extends ShapeDescriptor>
Parameters:
desc - Descriptor (only bare form is considered)
Returns:
Byte array representation of the descriptor

toString

public String toString(D desc)
Description copied from interface: DescriptorGenerator
Creates the String representation of a descriptor object.

The descriptors bare form can be reconstructed using DescriptorGenerator.fromString(java.lang.String).

Specified by:
toString in interface DescriptorGenerator<D extends ShapeDescriptor>
Parameters:
desc - Descriptor (only bare form is considered)
Returns:
String representation of descriptor

fromString

public D fromString(String desc)
Description copied from interface: DescriptorGenerator
Builds a descriptor from its string representation.

Please note that the compatibility of this (the reconstructing) DescriptorGenerator, regarding to the serializing generator (on which DescriptorGenerator.toString(com.chemaxon.descriptors.common.Descriptor) was called to construct the String form) is not checked; compatibility must be ensured by the user application.

Specified by:
fromString in interface DescriptorGenerator<D extends ShapeDescriptor>
Parameters:
desc - String representation
Returns:
Reconstructed descriptors bare form

getParameters

public P getParameters()
Description copied from interface: DescriptorGenerator
Gets the parameter class.

Specified by:
getParameters in interface DescriptorGenerator<D extends ShapeDescriptor>
Returns:
paramater obj

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getBareDescriptor

public D getBareDescriptor(D descriptor)
Description copied from interface: DescriptorGenerator
Get bare-only form of a descriptor.

Specified by:
getBareDescriptor in interface DescriptorGenerator<D extends ShapeDescriptor>
Parameters:
descriptor - A descriptor's rich or bare form
Returns:
Bare-only representation of given descriptor

getGuardObject

public Object getGuardObject()
Description copied from interface: DescriptorGenerator
Gets the guard object.

Specified by:
getGuardObject in interface DescriptorGenerator<D extends ShapeDescriptor>
Returns:
The guard object

jklustor-all-api-0.0.7-20140619012755 (ChemAxon)