Package org.armedbear.lisp
Class AbstractArray
- java.lang.Object
-
- org.armedbear.lisp.LispObject
-
- org.armedbear.lisp.AbstractArray
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AbstractVector
,ComplexArray
,ComplexArray_ByteBuffer
,ComplexArray_IntBuffer
,ComplexArray_UnsignedByte32
,ComplexArray_UnsignedByte8
,SimpleArray_ByteBuffer
,SimpleArray_CharBuffer
,SimpleArray_IntBuffer
,SimpleArray_T
,SimpleArray_UnsignedByte16
,SimpleArray_UnsignedByte32
,SimpleArray_UnsignedByte8
,ZeroRankArray
public abstract class AbstractArray extends LispObject implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractArray()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AbstractArray
adjustArray(int[] dims, AbstractArray displacedTo, int displacement)
abstract AbstractArray
adjustArray(int[] dims, LispObject initialElement, LispObject initialContents)
Returns a newly allocated array or the current array with adjusted dimensions.LispObject
arrayDisplacement()
abstract void
aset(int index, LispObject newValue)
protected static int
computeTotalSize(int[] dimensions)
boolean
equalp(LispObject obj)
abstract void
fill(LispObject obj)
LispObject
get(int[] subscripts)
abstract int
getDimension(int n)
abstract LispObject
getDimensions()
abstract LispObject
getElementType()
int
getFillPointer()
abstract int
getRank()
int
getRowMajorIndex(int[] subscripts)
int
getRowMajorIndex(LispObject[] subscripts)
abstract int
getTotalSize()
boolean
hasFillPointer()
boolean
isAdjustable()
boolean
isDisplaced()
java.lang.String
printObject(int[] dimv)
int
psxhash()
void
set(int[] subscripts, LispObject newValue)
void
setFillPointer(int fillPointer)
void
setFillPointer(LispObject fillPointer)
LispObject
typep(LispObject type)
-
Methods inherited from class org.armedbear.lisp.LispObject
ABS, add, add, aref, AREF, AREF, aref_long, aset, aset, ash, ash, atom, ATOM, caddr, cadr, car, cddr, cdr, CHAR, characterp, CHARACTERP, chars, classOf, COMPLEXP, constantp, CONSTANTP, copyToArray, decr, DENOMINATOR, dispatch, divideBy, doubleValue, elt, endp, ENDP, EQ, eql, eql, eql, EQL, equal, equal, EQUAL, equalp, evenp, EVENP, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, floatp, FLOATP, floatValue, getBooleanValue, getCallCount, getDescription, getDocumentation, getFixnumSlotValue, getHotCount, getInstance, getParts, getPropertyList, getSlotValue, getSlotValue_0, getSlotValue_1, getSlotValue_2, getSlotValue_3, getSlotValueAsBoolean, getStringChars, getStringValue, getSymbolFunction, getSymbolFunctionOrDie, getSymbolSetfFunction, getSymbolSetfFunctionOrDie, getSymbolValue, incr, incrementCallCount, incrementHotCount, integerp, INTEGERP, intValue, IS_E, IS_GE, IS_GT, IS_LE, IS_LT, IS_NE, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNotEqualTo, isNotEqualTo, isSpecialOperator, isSpecialVariable, javaInstance, javaInstance, LDB, length, LENGTH, listp, LISTP, lockableInstance, LOGAND, LOGAND, LOGIOR, LOGIOR, LOGNOT, LOGXOR, LOGXOR, longValue, minusp, MINUSP, MOD, MOD, multiplyBy, multiplyBy, negate, noFillPointer, NOT, nreverse, NTH, NTH, nthcdr, numberp, NUMBERP, NUMERATOR, oddp, ODDP, plusp, PLUSP, princToString, printObject, psxhash, push, rationalp, RATIONALP, realp, REALP, resolve, reverse, RPLACA, RPLACD, SCHAR, setCallCount, setCar, setCdr, setDocumentation, setHotCount, setPropertyList, setSlotValue, setSlotValue, setSlotValue_0, setSlotValue_1, setSlotValue_2, setSlotValue_3, SIMPLE_STRING_P, SLOT_VALUE, STRING, stringp, STRINGP, subtract, subtract, SVREF, svset, sxhash, SYMBOLP, truncate, typeOf, unreadableString, unreadableString, VECTOR_PUSH_EXTEND, VECTOR_PUSH_EXTEND, vectorp, VECTORP, vectorPushExtend, zerop, ZEROP
-
-
-
-
Method Detail
-
typep
public LispObject typep(LispObject type)
- Overrides:
typep
in classLispObject
-
equalp
public boolean equalp(LispObject obj)
- Overrides:
equalp
in classLispObject
-
isDisplaced
public boolean isDisplaced()
-
arrayDisplacement
public LispObject arrayDisplacement()
-
hasFillPointer
public boolean hasFillPointer()
-
getFillPointer
public int getFillPointer()
-
setFillPointer
public void setFillPointer(LispObject fillPointer)
-
setFillPointer
public void setFillPointer(int fillPointer)
-
isAdjustable
public boolean isAdjustable()
-
getRank
public abstract int getRank()
-
getDimensions
public abstract LispObject getDimensions()
-
getDimension
public abstract int getDimension(int n)
-
getElementType
public abstract LispObject getElementType()
-
getTotalSize
public abstract int getTotalSize()
-
aset
public abstract void aset(int index, LispObject newValue)
- Overrides:
aset
in classLispObject
-
computeTotalSize
protected static final int computeTotalSize(int[] dimensions)
-
getRowMajorIndex
public int getRowMajorIndex(LispObject[] subscripts)
-
getRowMajorIndex
public int getRowMajorIndex(int[] subscripts)
-
get
public LispObject get(int[] subscripts)
-
set
public void set(int[] subscripts, LispObject newValue)
-
fill
public abstract void fill(LispObject obj)
-
printObject
public java.lang.String printObject(int[] dimv)
-
psxhash
public int psxhash()
- Overrides:
psxhash
in classLispObject
-
adjustArray
public abstract AbstractArray adjustArray(int[] dims, LispObject initialElement, LispObject initialContents)
Returns a newly allocated array or the current array with adjusted dimensions.- Parameters:
dims
-initialElement
-initialContents
-- Returns:
-
adjustArray
public abstract AbstractArray adjustArray(int[] dims, AbstractArray displacedTo, int displacement)
- Parameters:
dims
-displacedTo
-displacement
-- Returns:
-
-