Changeset 5982


Ignore:
Timestamp:
02/26/04 01:15:40 (17 years ago)
Author:
piso
Message:

fill(), toString()

File:
1 edited

Legend:

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

    r5969 r5982  
    33 *
    44 * Copyright (C) 2004 Peter Graves
    5  * $Id: ZeroRankArray.java,v 1.1 2004-02-25 18:33:59 piso Exp $
     5 * $Id: ZeroRankArray.java,v 1.2 2004-02-26 01:15:40 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    101101            signal(new TypeError("Bad row major index " + index + "."));
    102102    }
     103
     104    public void fill(LispObject obj) throws ConditionThrowable
     105    {
     106        if (obj.typep(elementType) == NIL)
     107            signal(new TypeError(obj, elementType));
     108        data = obj;
     109    }
     110
     111    public String toString()
     112    {
     113        StringBuffer sb = new StringBuffer("#0A");
     114        sb.append(data);
     115        return sb.toString();
     116    }
    103117}
Note: See TracChangeset for help on using the changeset viewer.