com.jstatcom.ts
Class TSTypes
- java.lang.Object
-
- com.jstatcom.ts.TSTypes
-
public class TSTypes extends java.lang.ObjectThis class contains an enumeration of constants that define different types of time series.It implements the typesave enum pattern (Joshua Bloch, "Effective Java", Item 21) . If you compare
TSTypes, always use the==operator. This is save, because they are Singletons (Gamma et al., 1995) .
-
-
Field Summary
Fields Modifier and Type Field and Description static TSTypesDETERMINISTICType for deterministic series.static TSTypesENDOGENOUSType for endogenous series.static TSTypesEXOGENOUSType for exogenous series.
-
Constructor Summary
Constructors Constructor and Description TSTypes(java.lang.String name)Creates aTSTypeswith a descriptive name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)Override prevention method to enforcea.equals(b)if and onlyif a==b.javax.swing.IcongetIcon()Gets the respective icon that visualizes the property.java.lang.StringgetName()Gets the name of the type.inthashCode()Override prevention method invokes super method.java.lang.StringtoString()Returns a string representation of the type, do not use for comparisons.static TSTypesvalueOf(java.lang.String str)Factory method that gets a reference to the static type from an identifying string.
-
-
-
Field Detail
-
ENDOGENOUS
public static final TSTypes ENDOGENOUS
Type for endogenous series.
-
EXOGENOUS
public static final TSTypes EXOGENOUS
Type for exogenous series.
-
DETERMINISTIC
public static final TSTypes DETERMINISTIC
Type for deterministic series.
-
-
Constructor Detail
-
TSTypes
public TSTypes(java.lang.String name)
Creates aTSTypeswith a descriptive name.- Parameters:
name- identifier- Throws:
java.lang.IllegalStateException- if a type with the same name has already been created beforejava.lang.IllegalArgumentException-if (name == null)
-
-
Method Detail
-
valueOf
public static final TSTypes valueOf(java.lang.String str)
Factory method that gets a reference to the static type from an identifying string. The lookup is case insensitive.- Parameters:
str- type name- Returns:
- singleton instance for the type name, or
nullif no such type exists - Throws:
java.lang.IllegalArgumentException-if (str == null)
-
equals
public final boolean equals(java.lang.Object o)
Override prevention method to enforcea.equals(b)if and onlyif a==b.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- object to compare with- Returns:
trueif equal,falseotherwise
-
getIcon
public javax.swing.Icon getIcon()
Gets the respective icon that visualizes the property.- Returns:
- icon for visualization of this type
-
getName
public final java.lang.String getName()
Gets the name of the type. Do not use for comparisons, but compare by reference.- Returns:
- name of this type
-
hashCode
public final int hashCode()
Override prevention method invokes super method.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hash code
-
toString
public final java.lang.String toString()
Returns a string representation of the type, do not use for comparisons.- Overrides:
toStringin classjava.lang.Object- Returns:
- string representing this type
-
-
DMelt 3.0 © DataMelt by jWork.ORG