Changeset 4575


Ignore:
Timestamp:
10/30/03 08:17:14 (18 years ago)
Author:
asimon
Message:

added javaInstance method

Location:
trunk/j/src/org/armedbear/lisp
Files:
5 edited

Legend:

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

    r4035 r4575  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Fixnum.java,v 1.75 2003-09-23 17:08:50 piso Exp $
     5 * $Id: Fixnum.java,v 1.76 2003-10-30 08:17:14 asimon Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3636    {
    3737        this.value = value;
     38    }
     39
     40    public Object javaInstance()
     41    {
     42        return new Integer(value);
    3843    }
    3944
  • trunk/j/src/org/armedbear/lisp/LispCharacter.java

    r4129 r4575  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: LispCharacter.java,v 1.29 2003-09-29 16:20:55 piso Exp $
     5 * $Id: LispCharacter.java,v 1.30 2003-10-30 08:17:14 asimon Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    127127    {
    128128        return c;
     129    }
     130
     131    public Object javaInstance()
     132    {
     133      return new Character(c);
    129134    }
    130135
  • trunk/j/src/org/armedbear/lisp/LispFloat.java

    r3929 r4575  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: LispFloat.java,v 1.49 2003-09-20 17:02:04 piso Exp $
     5 * $Id: LispFloat.java,v 1.50 2003-10-30 08:17:14 asimon Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    160160    {
    161161        return value;
     162    }
     163
     164    public Object javaInstance()
     165    {
     166        return new Double(value);
    162167    }
    163168
  • trunk/j/src/org/armedbear/lisp/LispObject.java

    r4423 r4575  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: LispObject.java,v 1.61 2003-10-17 13:10:48 piso Exp $
     5 * $Id: LispObject.java,v 1.62 2003-10-30 08:17:14 asimon Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    7070    }
    7171
     72    public Object javaInstance() throws ConditionThrowable
     73    {
     74        throw new ConditionThrowable(new TypeError(this, "primitive type"));
     75    }
     76
    7277    public LispObject car() throws ConditionThrowable
    7378    {
  • trunk/j/src/org/armedbear/lisp/LispString.java

    r4322 r4575  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: LispString.java,v 1.62 2003-10-12 13:45:13 piso Exp $
     5 * $Id: LispString.java,v 1.63 2003-10-30 08:17:14 asimon Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    256256
    257257    public final String getValue()
     258    {
     259        return new String(array);
     260    }
     261
     262    public Object javaInstance()
    258263    {
    259264        return new String(array);
Note: See TracChangeset for help on using the changeset viewer.