Package chemaxon.struc
Class MPropertyContainer
java.lang.Object
chemaxon.struc.MPropertyContainer
- All Implemented Interfaces:
- Externalizable,- Serializable,- Cloneable
Property container.
- Since:
- Marvin 4.1, 11/20/2005
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()Clears properties.clone()Clones this object.booleanTests whether the container contains the specified property object.voidflatten()Flattens hierarchically specified RDF properties.Gets a property object.getKey(int i) Gets a property key.String[]getKeys()Returns the property keys.Gets a property object.Gets the list of basic properties.Deprecated, for removal: This API element is subject to removal in a future version.booleanbooleanTests whether a property is a self reference to the containing molecule.booleanTests whether a coordinate dependent property is still valid.voidRestores the property container's state.voidRemoves a property.voidReplaces or removes a property.voidSets a property object.voidSets a property object.voidSets a property object.voidSets a property.intsize()Gets the total number of properties.voidSaves the property container's state.
- 
Constructor Details- 
MPropertyContainerpublic MPropertyContainer()Creates an empty property container.
 
- 
- 
Method Details- 
clearpublic void clear()Clears properties.
- 
sizepublic int size()Gets the total number of properties.- Returns:
- number of properties
 
- 
getKeysReturns the property keys.- Returns:
- the array of keys
 
- 
getKeyGets a property key.- Parameters:
- i- property index
- Returns:
- the property name
 
- 
getString@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public String getString(String key) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byMPropHandler.convertToString(MPropertyContainer, String)Gets a property.- Parameters:
- key- property name
- Returns:
- the value of the property, or null if the key is not found
 
- 
getGets a property object.- Parameters:
- key- property name
- Returns:
- the value of the property, or null if the key is not found
 
- 
setStringSets a property. Setting null value removes the property.- Parameters:
- key- the property name
- value- the value or null
 
- 
setSets a property object. Setting null value removes the property.- Parameters:
- key- the property name
- value- the value or null
 
- 
setSets a property object. Setting null value removes the property.- Parameters:
- key- the property name
- value- the value or null
- opts- 0 or- MProp.COORDDEP
 
- 
removeRemoves a property.- Parameters:
- p- the object
- Since:
- Marvin 4.1.6, 02/21/2007
 
- 
replaceReplaces or removes a property.- Parameters:
- oldp- the old object
- newp- the new object or- nullto remove
- Since:
- Marvin 4.1.6, 02/14/2007
 
- 
containsTests whether the container contains the specified property object.- Parameters:
- p- the object
- Since:
- Marvin 4.1.6, 02/21/2007
 
- 
isValidTests whether a coordinate dependent property is still valid.- Parameters:
- prop- the property
- Returns:
- trueif the property is valid,- falseotherwise
- See Also:
 
- 
isSelfReferenceTests whether a property is a self reference to the containing molecule.- Parameters:
- p- the property
- Returns:
- trueif the property is a self reference,- falseotherwise
- Since:
- Marvin 5.0, 11/05/2007
 
- 
isHierarchicpublic boolean isHierarchic()Tests whether the property list contains subcollections likeMListPropandMHashProp. A property list containing names in MDL RDfile style can be made hierarchic by callinghierarchize().- Returns:
- trueif the property list contains subcollections,- falseotherwise
- Since:
- Marvin 4.1.6, 02/15/2007
 
- 
hierarchize- Returns:
- the most likely "root" name (the name of the first
         MHashProptype property) ornull
- Since:
- Marvin 4.1.6, 02/14/2007
- See Also:
 
- 
flattenpublic void flatten()Flattens hierarchically specified RDF properties. The inverse operation ofhierarchize().- Since:
- Marvin 4.1.6, 02/14/2007
- See Also:
 
- 
getPropListGets the list of basic properties. Properties containers likeMListPropandMHashPropare not added to the list but searched recursively for their basic elements.- Returns:
- the list of MPropobjects
- Since:
- Marvin 4.1.6, 02/15/2007
 
- 
getObjectGets a property object.- Parameters:
- key- property name
- Returns:
- the value of the property, or null if the key is not found
 
- 
setObjectSets a property object. Setting null value removes the property.- Parameters:
- key- the property name
- val- the value or null
 
- 
cloneClones this object.
- 
readExternalRestores the property container's state.- Specified by:
- readExternalin interface- Externalizable
- Parameters:
- in- the stream to read data from in order to restore the object
- Throws:
- IOException- if I/O errors occur
- ClassNotFoundException- If the class for an object being restored cannot be found.
 
- 
writeExternalSaves the property container's state.- Specified by:
- writeExternalin interface- Externalizable
- Parameters:
- out- the stream to write the object to
- Throws:
- IOException- Includes any I/O exceptions that may occur
 
 
- 
MPropHandler.convertToString(MPropertyContainer, String)