Package weka.core

# Class Debug.Timestamp

java.lang.Object
weka.core.Debug.Timestamp

All Implemented Interfaces:
  `Serializable`, `RevisionHandler`

Enclosing class:
  Debug

public static class Debug.Timestamp extends Object implements Serializable, RevisionHandler
A class that can be used for timestamps in files, The toString() method simply returns the associated Date object in a timestamp format. For formatting options, see java.text.SimpleDateFormat.

Version:
  $Revision: 8034 $
Author:
  FracPete (fracpete at waikato dot ac dot nz)
See Also:
  - `SimpleDateFormat`
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DEFAULT_FORMAT`
  the default format

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Timestamp()`
  creates a timestamp with the current date and time and the default format.
  `Timestamp(String format)`
  creates a timestamp with the current date and time and the specified format.
  `Timestamp(Date stamp)`
  creates a timestamp with the given date and the default format.
  `Timestamp(Date stamp, String format)`
  creates a timestamp with the given date and format.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getFormat()`
  returns the current timestamp format
  `String`
  `getRevision()`
  Returns the revision string.
  `Date`
  `getStamp()`
  returns the associated date/time
  `void`
  `setFormat(String value)`
  sets the format for the timestamp
  `String`
  `toString()`
  returns the timestamp as string in the specified format

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### DEFAULT_FORMAT

    public static final String DEFAULT_FORMAT
    the default format
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Timestamp

    public Timestamp()
    creates a timestamp with the current date and time and the default format.

  - ### Timestamp

    public Timestamp(String format)
    creates a timestamp with the current date and time and the specified format.
    Parameters:
      `format` - the format of the timestamp
    See Also:
      - `SimpleDateFormat`

  - ### Timestamp

    public Timestamp(Date stamp)
    creates a timestamp with the given date and the default format.
    Parameters:
      `stamp` - the associated date/time for the timestamp

  - ### Timestamp

    public Timestamp(Date stamp, String format)
    creates a timestamp with the given date and format.
    Parameters:
      `stamp` - the associated date/time for the timestamp
      `format` - the format of the timestamp
    See Also:
      - `SimpleDateFormat`

- ## Method Details

  - ### setFormat

    public void setFormat(String value)
    sets the format for the timestamp
    Parameters:
      `value` - the format string
    See Also:
      - `SimpleDateFormat`

  - ### getFormat

    public String getFormat()
    returns the current timestamp format
    Returns:
      the current format

  - ### getStamp

    public Date getStamp()
    returns the associated date/time
    Returns:
      the timestamp value

  - ### toString

    public String toString()
    returns the timestamp as string in the specified format
    Overrides:
      `toString` in class `Object`
    Returns:
      the timestamp as string

  - ### getRevision

    public String getRevision()
    Returns the revision string.
    Specified by:
      `getRevision` in interface `RevisionHandler`
    Returns:
      the revision