Overview | Package | Class | Tree | Deprecated | Index | Help
| SMILA API documentation
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.smila.datamodel.impl
Class DateValue

    java.lang.Object
      org.eclipse.smila.datamodel.impl.DateValue

All Implemented Interfaces:
  java.io.Serializable

    public final class DateValue

extends java.lang.Object
implements java.io.Serializable

Pair of a Date and optionally the original string from which it was parsed. Used to ensure that Date or Timestamp Values parsed from JSON or BON string values are reproduced in exactly the same form when converted to a string again.

See Also:
  Serialized Form

Constructor Summary
`DateValue(java.util.Date date, java.lang.String originalString)` create a pair of a date and the string it was parsed from.

Method Summary
`boolean` | `equals(java.lang.Object obj)`
`java.util.Date` | `getDate()`
`java.lang.String` | `getOriginalString()`
`long` | `getTime()`
`int` | `hashCode()`
`boolean` | `hasOriginalString()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DateValue

    public DateValue(java.util.Date date,
                     java.lang.String originalString)

  create a pair of a date and the string it was parsed from.

Method Detail

### getDate

    public java.util.Date getDate()

  Returns:
    the date.

### getTime

    public long getTime()

  Returns:
    `Date.getTime()` of the contained date.

### getOriginalString

    public java.lang.String getOriginalString()

  Returns:
    the original string, if the date was parsed.

### hasOriginalString

    public boolean hasOriginalString()

  Returns:
    true if an original string is stored.

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`
  Returns:
    true if the other object is a `DateValue`, too, and contains an equals date object. The original string is not relevant for the comparison.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    hashCode of the contained date object.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    toString of contained date object.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SMILA API documentation
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD