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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    the default format
  • Constructor Summary

    Constructors
    Constructor
    Description
    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
    returns the current timestamp format
    Returns the revision string.
    returns the associated date/time
    void
    sets the format for the timestamp
    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

  • 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:
    • 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:
  • Method Details

    • setFormat

      public void setFormat(String value)
      sets the format for the timestamp
      Parameters:
      value - the format string
      See Also:
    • 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