public class BitSelector extends BitField
The main purpose of this class is to provide Java representation of the
Bit Selector
attribute type.
Constructor and Description |
---|
BitSelector(int width,
int index)
Construct an instance of specified width and with specified bit set to
true . |
Modifier and Type | Method and Description |
---|---|
void |
and(java.util.BitSet set)
This method is not allowed for use.
|
void |
andNot(java.util.BitSet set)
This method is not allowed for use.
|
void |
clear()
This method is not allowed for use.
|
void |
clear(int index)
This method is not allowed for use.
|
void |
clear(int from,
int to)
This method is not allowed for use.
|
private void |
disabled()
Just throw an exception
|
void |
flip(int index)
This method is not allowed for use.
|
void |
flip(int from,
int to)
This method is not allowed for use.
|
void |
set(int index)
Set specified bit into
true . |
void |
set(int index,
boolean val)
Set specified bit into specified value.
|
void |
set(int from,
int to)
Set specified range of bits into
true . |
void |
set(int from,
int to,
boolean val)
Set specified range of bits into specified value.
|
static BitField |
valueOf(java.lang.String str)
Parse
String like 00000100 and create an instance of
BitSelector . |
void |
xor(java.util.BitSet set)
Performs a logical XOR of this bit field with the argument bit set.
|
public BitSelector(int width, int index)
true
.width
- BitSelector width.index
- Set bit index.public static BitField valueOf(java.lang.String str)
String
like 00000100 and create an instance of
BitSelector
.str
- Source string.BitSelector
instance or null
if source string does not contain properly formatted bit field.public void and(java.util.BitSet set)
public void andNot(java.util.BitSet set)
public void clear()
clear
in class java.util.BitSet
java.lang.IllegalArgumentException
- thrown for any try to call this method.public void clear(int index)
public void clear(int from, int to)
public void flip(int index)
public void flip(int from, int to)
public void set(int index)
true
.public void set(int index, boolean val)
public void set(int from, int to)
true
.public void set(int from, int to, boolean val)
true
.public void xor(java.util.BitSet set)
private void disabled()
java.lang.IllegalArgumentException
- if method is called.