Bees v0.5.0 API

bees.core
Class Strict

java.lang.Object
  |
  +--bees.core.Strict

public final class Strict
extends java.lang.Object

The Strict class provides some static functions for checking state that can vary depending on how strict the checking should be. For example, if something is very unlikely to happen, but still possible, we can't use an assert statement or similar hard check. However, leaving a condition unchecked might mask a real problem. So, we define a few "strictness" modes and handle failures depending on the current mode.


Method Summary
static void fail()
          Unlikely code is being executed, fail depending on the mode.
static void fail(java.lang.String msg)
          Unlikely code is being executed, fail depending on the mode and print a message.
static void test(boolean value)
          Test a value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

test

public static void test(boolean value)
Test a value.
Parameters:
value - The value to check, if false, the action taken will depend on the mode.

fail

public static void fail()
Unlikely code is being executed, fail depending on the mode.

fail

public static void fail(java.lang.String msg)
Unlikely code is being executed, fail depending on the mode and print a message.
Parameters:
msg - A description of the problem.

Bees v0.5.0 API

This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/