bt747.sys
Class Generic

java.lang.Object
  extended by bt747.sys.Generic

public final class Generic
extends java.lang.Object

Author:
Mario De Weerd

Constructor Summary
Generic()
           
 
Method Summary
static double acos(double x)
          Calculate inverse cosinus
static void addThread(BT747Thread o, boolean highPrio)
          Add a thread to the thread list.
static void debug(java.lang.String s)
           
static void debug(java.lang.String s, java.lang.Throwable e)
           
static void exception(java.lang.String s, java.lang.Throwable e)
           
static java.lang.String expandPercentTokens(java.lang.String s, BT747Hashtable tokens)
          Fill a tokens list like this (for instance):
tokens.put("p", baseDir);
tokens.put("e", fileExt);
tokens.put("f", fileBase);
and %p, %e, %f will be replaced accordingly.
static int getDebugLevel()
          Get the debug level.
static int getTimeStamp()
           
static boolean isDebug()
          Is debug information active
static double pow(double x, double y)
          Calculate x^^y.
static void removeThread(BT747Thread o)
          Remove a thread from the thread list.
static void setDebugLevel(int level)
          Set the debug level.
static void setPoster(EventPoster poster)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generic

public Generic()
Method Detail

debug

public static final void debug(java.lang.String s,
                               java.lang.Throwable e)

debug

public static final void debug(java.lang.String s)

setPoster

public static final void setPoster(EventPoster poster)

exception

public static final void exception(java.lang.String s,
                                   java.lang.Throwable e)

getDebugLevel

public static final int getDebugLevel()
Get the debug level.

Returns:
debug level.

isDebug

public static final boolean isDebug()
Is debug information active

Returns:
true if debug level is not 0.

setDebugLevel

public static final void setDebugLevel(int level)
Set the debug level.

Parameters:
level - Level.

getTimeStamp

public static final int getTimeStamp()

addThread

public static final void addThread(BT747Thread o,
                                   boolean highPrio)
Add a thread to the thread list.

Parameters:
o - The thread.
highPrio - True if high priority.

removeThread

public static final void removeThread(BT747Thread o)
Remove a thread from the thread list.

Parameters:
o - Thread to remove.

acos

public static final double acos(double x)
Calculate inverse cosinus

Parameters:
x - x.
Returns:
acos(x)

pow

public static final double pow(double x,
                               double y)
Calculate x^^y. (x to the power of y)

Parameters:
x - x.
y - y.
Returns:
x^^y.

expandPercentTokens

public static final java.lang.String expandPercentTokens(java.lang.String s,
                                                         BT747Hashtable tokens)
Fill a tokens list like this (for instance):
tokens.put("p", baseDir);
tokens.put("e", fileExt);
tokens.put("f", fileBase);
and %p, %e, %f will be replaced accordingly.

Parameters:
s - String witn '%c' tokens where %c will be replaced if 'c' in the list of tokens.
tokens - Hashtable with tokens.
Returns:
String with replaced values.