Rambler's Top100
package com.bexp;

import com.bexp.ASSERT.Alerter;

public class DefaultAlerter implements Alerter
{
public DefaultAlerter() {}
public void alert(Object subject)
    {
    System.out.println(subject);
    if(subject instanceof Exception)
        {System.out.println(((Exception)subject).getCause());}
    }
public void alert(Object source, Object subject)
    {
    System.out.print(source.getClass().getName());
    System.out.print(":");
    alert(subject);
    }

public void setWaitingState(boolean wait)
    {
    if(wait)
        { System.out.println("Wait..."); }
    else
        { System.out.println("Done."); }
    }
public boolean confirm(String str) throws Exception
    {
    System.out.println(str);
    System.out.println("(yes/no)?");
    // to be done
    if(true) {throw new Exception("not supported");}
    return false;
    }

};

Предприятие реального времени №1

На главную   Новости   Карта сайта
  Rambler's Top100