|
Copyright © Rasmus Sten and contributors, 1997-2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nu.dll.lyskom.KomToken | +--nu.dll.lyskom.Bitstring
This class represents the LysKOM data type BITSTRING, which is a serie of ones and zeroes making up a vector of boolean "flags". It can thus be seen as an array of boolean values.
Field Summary | |
static int |
ITEM_SIZE
|
Fields inherited from class nu.dll.lyskom.KomToken |
ARRAY, COMPL, HOLLERITH, PRIMITIVE |
Constructor Summary | |
Bitstring()
Creates an empty Bitstring |
|
Bitstring(boolean[] bits)
Creates a Bitstring out of an boolean[]. |
|
Bitstring(nu.dll.lyskom.KomToken bits)
Creates a Bitstring out of the contents in the supplied KomToken |
|
Bitstring(java.lang.String s)
Creates a Bitstring out of the contents in the supplied String |
Method Summary | |
boolean |
getBitAt(int i)
Returns the status at a specific position in this Bitstring. |
boolean[] |
getBits()
Returns a boolean[] equal the bits' representation in this Bitstring. |
void |
setBitAt(int i,
boolean value)
Sets the value of a bit at a specific position in this Bitstring. |
java.lang.String |
toString()
|
Methods inherited from class nu.dll.lyskom.KomToken |
equals, getContents, getType, intValue, isEol, setContents, toInt, toInteger |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static int ITEM_SIZE
Constructor Detail |
public Bitstring()
public Bitstring(nu.dll.lyskom.KomToken bits)
bits
- the KomToken object containing BITSTRING datapublic Bitstring(java.lang.String s)
s
- the String object containing BITSTRING datapublic Bitstring(boolean[] bits)
bits
- an array of booleanMethod Detail |
public boolean getBitAt(int i)
i
- the position to look atpublic void setBitAt(int i, boolean value)
i
- the position to changevalue
- the new valuepublic boolean[] getBits()
public java.lang.String toString()
toString
in class KomToken
|
Copyright © Rasmus Sten and contributors, 1997-2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |