public class InterruptDescriptor
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static InterruptDescriptor |
create(long id,
java.lang.String name)
Create a new interrupt descriptor.
|
static InterruptDescriptor |
get(java.lang.String name)
Get a memory interrupt descriptor by name.
|
long |
getID()
Obtains the id of this interrupt descriptor.
|
java.lang.String |
getName()
Obtains the name of this interrupt descriptor.
|
static boolean |
isInterrupt(java.lang.String name)
Ask whether or not there is a memory interrupt descriptor of a given name.
|
java.lang.String |
toString()
Gets a printable representation for a descriptor.
|
static void |
visitInterrupts(java.util.function.Consumer<InterruptDescriptor> visitor)
Visit all valid interrupt identifiers.
|
public static InterruptDescriptor create(long id, java.lang.String name) throws StaticIllegalArgumentException, StaticIllegalStateException
id
- the numerical ID of the new descriptor.name
- of the descriptorStaticIllegalArgumentException
- when name
is null
.StaticIllegalStateException
- when a descriptor with name
already exists.public static InterruptDescriptor get(java.lang.String name) throws StaticIllegalArgumentException
name
- of the descriptornull
, when none with
name
exists.StaticIllegalArgumentException
- when name
is null
.public static boolean isInterrupt(java.lang.String name)
name
- for which to searchtrue
when there is one and false
otherwise.public static void visitInterrupts(java.util.function.Consumer<InterruptDescriptor> visitor)
visitor
- the code to execute on each descriptor.public final java.lang.String getName()
public final long getID()
public final java.lang.String toString()
toString
in class java.lang.Object