Changeset 5098


Ignore:
Timestamp:
12/12/03 16:16:29 (17 years ago)
Author:
piso
Message:

formatControl, formatArguments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Condition.java

    r4633 r5098  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Condition.java,v 1.14 2003-11-03 18:49:20 piso Exp $
     5 * $Id: Condition.java,v 1.15 2003-12-12 16:16:29 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2424public class Condition extends StandardObject
    2525{
    26     private final String message;
     26    private LispObject formatControl;
     27    private LispObject formatArguments;
     28
     29    private String message = null;
    2730
    2831    public Condition()
     
    3740    }
    3841
    39     public Condition(LispObject initArgs)
     42    public Condition(LispObject initArgs) throws ConditionThrowable
    4043    {
    41         this(); // FIXME
     44        LispObject formatControl = NIL;
     45        LispObject formatArguments = NIL;
     46        LispObject first, second;
     47        while (initArgs != NIL) {
     48            first = initArgs.car();
     49            initArgs = initArgs.cdr();
     50            second = initArgs.car();
     51            initArgs = initArgs.cdr();
     52            if (first == Keyword.FORMAT_CONTROL)
     53                formatControl = second;
     54            else if (first == Keyword.FORMAT_ARGUMENTS)
     55                formatArguments = second;
     56        }
     57        setFormatControl(formatControl);
     58        setFormatArguments(formatArguments);
    4259    }
    4360
     
    4562    {
    4663        this.message = message;
     64    }
     65
     66    public final LispObject getFormatControl()
     67    {
     68        return formatControl;
     69    }
     70
     71    public final void setFormatControl(LispObject formatControl)
     72    {
     73        this.formatControl = formatControl;
     74    }
     75
     76    public final LispObject getFormatArguments()
     77    {
     78        return formatArguments;
     79    }
     80
     81    public final void setFormatArguments(LispObject formatArguments)
     82    {
     83        this.formatArguments = formatArguments;
    4784    }
    4885
Note: See TracChangeset for help on using the changeset viewer.