Interface AtomicClass

All Superinterfaces:
DataClass, PropertyHandler
All Known Subinterfaces:
BooleanClass, ByteArrayClass, ChronologicClass, DateClass, DoubleClass, IntegerClass, NumericClass, StringClass, TimeClass, TimestampClass, URIClass
All Known Implementing Classes:
AtomicClassImpl, BooleanClassImpl, ByteArrayClassImpl, ChronologicClassImpl, DateClassImpl, DoubleClassImpl, IntegerClassImpl, NumericClassImpl, StringClassImpl, TimeClassImpl, TimeStampClassImpl, URIClassImpl

public interface AtomicClass extends DataClass
The group of Atomic Classes is used to store exact one value. The counterpart in programming languages are data types like integer, double, or Boolean in Java. A specialisation can restrict the value ranges with intervals or enumerations. Intervals can only be used for Atomic classes that have totally ordered instances like instances of sub-classes from the NumericClass or the ChronologicClass. E.g., a class "Age" would be a sub-class of IntegerClass, restricted to values between zero and 150. These intervals are just restrictions of the possible values of an attribute with an Atomic Class as type and not the definition of intervals in instances of a class. Of course, this is also possible by using the data class IntervalClass. Enumerations define fix values for a class, e.g., a class "Colour" would be realised as sub-class of StringClass with the fixed values "red", "green", and "blue". Such enumeration values can be ordered totally or arranged in taxonomies. An exceptional role plays the Atomic Class ByteArrayClass that can be used to store more complex data objects like images or documents. Internally, it is of course an array of bytes, but conceptually it is used as one value, e.g., one image.

Atomic classes can have only one InstancePredicate that is automatically assigned if it is created by one of the factory methods createNewInstanceEnumerationPredicate() or createNewInstanceIntervalPredicate().

All AtomicClasses provide methods to convert the content objects to a String and from a String. See the methods nativeFromString(String) and nativeToString(Object). For example, the XML parser using this method to convert the value of an AtomicObject into a String and back.

Atomic classes can have only one InstancePredicate that is automatically assigned if it is created by one of the factory methods createNewInstanceEnumerationPredicate() or createNewInstanceIntervalPredicate().

All AtomicClasses provide methods to convert the content objects to a String and from a String. See the methods nativeFromString(String) and nativeToString(Object). For example, the XML parser using this method to convert the value of an AtomicObject into a String and back.

  AtomicObject object = ...;
  xmlWriter.append("value", object.getAtomicClass().nativeToString(
  object.getNativeObject()));
 

Never use the Object.toString() method because this method is for debugging purposes and results additional informations.

Author:
Rainer Maximini