Changeset 3851


Ignore:
Timestamp:
09/17/03 18:26:06 (19 years ago)
Author:
piso
Message:

UnspecifiedTypeSpecifier?.java

Location:
trunk/j/src/org/armedbear/lisp
Files:
1 deleted
2 edited

Legend:

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

    r3720 r3851  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: AtomicTypeSpecifier.java,v 1.6 2003-09-12 00:55:14 piso Exp $
     5 * $Id: AtomicTypeSpecifier.java,v 1.7 2003-09-17 18:26:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3636    }
    3737
    38     public LispObject test(LispObject obj) throws LispError
    39     {
    40         throw new LispError(String.valueOf(getClass()) +
    41                             ".test(): not implemented");
    42     }
    43 
    44     public LispObject isSubtypeOf(TypeSpecifier ts) throws LispError
    45     {
    46         if (ts instanceof UnspecifiedTypeSpecifier)
    47             return values(NIL, T);
    48         if (ts instanceof AtomicTypeSpecifier) {
    49             AtomicTypeSpecifier ats = (AtomicTypeSpecifier) ts;
    50             return type.isSubtypeOf(ats.type);
    51         }
    52         if (ts instanceof ClassTypeSpecifier) {
    53             ClassTypeSpecifier cts = (ClassTypeSpecifier) ts;
    54             Type otherType = Type.findType(cts.getLispClass());
    55             if (otherType != null)
    56                 return type.isSubtypeOf(otherType);
    57         }
    58         return values(NIL, T);
    59     }
     38//     public LispObject test(LispObject obj) throws LispError
     39//     {
     40//         throw new LispError(String.valueOf(getClass()) +
     41//                             ".test(): not implemented");
     42//     }
    6043}
  • trunk/j/src/org/armedbear/lisp/TypeSpecifier.java

    r3832 r3851  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: TypeSpecifier.java,v 1.6 2003-09-16 19:01:08 piso Exp $
     5 * $Id: TypeSpecifier.java,v 1.7 2003-09-17 18:26:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2424public abstract class TypeSpecifier extends LispObject
    2525{
    26     public static TypeSpecifier getInstance(LispObject arg) throws LispError
    27     {
    28         if (arg == Symbol.UNSPECIFIED)
    29             return UnspecifiedTypeSpecifier.getInstance();
    30         if (arg instanceof Symbol)
    31             return new AtomicTypeSpecifier((Symbol)arg);
    32         if (arg instanceof LispClass)
    33             return new ClassTypeSpecifier((LispClass)arg);
    34         throw new LispError("bad type specifier: " + arg);
    35     }
     26//     public static TypeSpecifier getInstance(LispObject arg) throws LispError
     27//     {
     28//         if (arg == Symbol.UNSPECIFIED)
     29//             return UnspecifiedTypeSpecifier.getInstance();
     30//         if (arg instanceof Symbol)
     31//             return new AtomicTypeSpecifier((Symbol)arg);
     32//         if (arg instanceof LispClass)
     33//             return new ClassTypeSpecifier((LispClass)arg);
     34//         throw new LispError("bad type specifier: " + arg);
     35//     }
    3636
    37     public LispObject test(LispObject obj) throws LispError
    38     {
    39         throw new LispError(String.valueOf(getClass()) + ".test(): not implemented");
    40     }
    41 
    42     public LispObject isSubtypeOf(TypeSpecifier ts) throws LispError
    43     {
    44         return values(NIL, NIL);
    45     }
     37//     public LispObject test(LispObject obj) throws LispError
     38//     {
     39//         throw new LispError(String.valueOf(getClass()) + ".test(): not implemented");
     40//     }
    4641}
Note: See TracChangeset for help on using the changeset viewer.