nl.chess.it.util.config
Class DurationParser

java.lang.Object
  extended bynl.chess.it.util.config.DurationParser

class DurationParser
extends java.lang.Object

Helper class that parses a String and interprets it as a duration.

Version:
$Revision: 1.1.1.1 $
Author:
Guus Bosman (Chess iT)

Constructor Summary
(package private) DurationParser()
           
 
Method Summary
 long getDurationInMs(java.lang.String key, java.lang.String value)
          Main parse method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DurationParser

DurationParser()
Method Detail

getDurationInMs

public long getDurationInMs(java.lang.String key,
                            java.lang.String value)
                     throws ConfigurationException
Main parse method.

Parameters:
key - Is only used to display better error messages if necessary.
value - String to parse. Cannot be null.
Returns:
A duration (long) in milliseconds. Never a negative number.
Throws:
ConfigurationException


Copyright © 2003-2005 Chess-iT. All Rights Reserved.