com.jstatcom.model
Class JSCTypes

java.lang.Object
  extended by com.jstatcom.model.JSCTypes

public abstract class JSCTypes
extends java.lang.Object

This enumeration contains all existing JSCData types. If new data types are to be added, this class needs to be extended.

Author:
Markus Kraetzig

Field Summary
static JSCTypes DATE
          Contains an single TSDate.
static JSCTypes DRANGE
          Contains an single TSDateRange.
static JSCTypes INT
          Contains a single Integer.
static JSCTypes MAP
          Contains an single arbitrary Object.
static JSCTypes NARRAY
          Contains an m x n double array.
static JSCTypes NUMBER
          Contains a single Double.
static JSCTypes SARRAY
          Contains an m x n String array.
static JSCTypes STRING
          Contains a single String.
static JSCTypes VOID
          Contains an single arbitrary Object.
 
Method Summary
 boolean equals(java.lang.Object o)
          Override prevention method to enforce a.equals(b) if and only if a==b.
 javax.swing.Icon getIcon()
          Gets the respective icon that visualizes the type.
 int hashCode()
          Override prevention method invokes super method.
 java.lang.String toString()
          Gets string representation of this object.
abstract  JSCData valueOfEmpty(java.lang.String name)
          Gets an empty JSCData instance for the specified type.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NUMBER

public static final JSCTypes NUMBER
Contains a single Double. Represented by JSCNumber.


INT

public static final JSCTypes INT
Contains a single Integer. Represented by JSCInt.


STRING

public static final JSCTypes STRING
Contains a single String. Represented by JSCString.


NARRAY

public static final JSCTypes NARRAY
Contains an m x n double array. Represented by JSCNArray.


SARRAY

public static final JSCTypes SARRAY
Contains an m x n String array. Represented by JSCSArray.


DATE

public static final JSCTypes DATE
Contains an single TSDate. Represented by JSCDate.


DRANGE

public static final JSCTypes DRANGE
Contains an single TSDateRange. Represented by JSCDRange.


VOID

public static final JSCTypes VOID
Contains an single arbitrary Object. Represented by JSCVoid.


MAP

public static final JSCTypes MAP
Contains an single arbitrary Object. Represented by JSCMap.

Method Detail

equals

public final boolean equals(java.lang.Object o)
Override prevention method to enforce a.equals(b) if and only if a==b.

Overrides:
equals in class java.lang.Object
Parameters:
o - object to compare with
Returns:
true if equal, false otherwise

getIcon

public javax.swing.Icon getIcon()
Gets the respective icon that visualizes the type.

Returns:
icon for visualization of this type

hashCode

public final int hashCode()
Override prevention method invokes super method.

Overrides:
hashCode in class java.lang.Object
Returns:
hash code

toString

public final java.lang.String toString()
Gets string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
a string

valueOfEmpty

public abstract JSCData valueOfEmpty(java.lang.String name)
Gets an empty JSCData instance for the specified type. Must be implemented by JSCTypes.

Parameters:
name - the name of the new instance
Returns:
instance of the respective type with isEmpty == true