public final class CatchHandlerList extends FixedSizeList implements java.lang.Comparable<CatchHandlerList>
| Modifier and Type | Class and Description |
|---|---|
static class |
CatchHandlerList.Entry
Entry in the list.
|
| Modifier and Type | Field and Description |
|---|---|
static CatchHandlerList |
EMPTY
non-null; empty instance |
| Constructor and Description |
|---|
CatchHandlerList(int size)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
catchesAll()
Returns whether or not this instance ends with a "catch-all"
handler.
|
int |
compareTo(CatchHandlerList other) |
CatchHandlerList.Entry |
get(int n)
Gets the element at the given index.
|
void |
set(int n,
CatchHandlerList.Entry entry)
Sets the entry at the given index.
|
void |
set(int n,
CstType exceptionType,
int handler)
Sets the entry at the given index.
|
java.lang.String |
toHuman()
Return the "human" string form of this instance.
|
java.lang.String |
toHuman(java.lang.String prefix,
java.lang.String header)
Get the human form of this instance, prefixed on each line
with the string.
|
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, toHuman, toString, toStringisImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutablepublic static final CatchHandlerList EMPTY
non-null; empty instancepublic CatchHandlerList(int size)
null.size - >= 0; the size of the listpublic CatchHandlerList.Entry get(int n)
NullPointerException.n - >= 0, < size(); which indexnon-null; element at that indexpublic java.lang.String toHuman()
toString().
This method will only work if every element of the list
implements ToHuman.toHuman in interface ToHumantoHuman in class FixedSizeListnon-null; the human string formpublic java.lang.String toHuman(java.lang.String prefix,
java.lang.String header)
prefix - non-null; the prefix for every lineheader - non-null; the header for the first line (after the
first prefix)non-null; the human formpublic boolean catchesAll()
true if this instance ends with a "catch-all"
handler or false if notpublic void set(int n,
CstType exceptionType,
int handler)
n - >= 0, < size(); which indexexceptionType - non-null; type of exception handledhandler - >= 0; exception handler addresspublic void set(int n,
CatchHandlerList.Entry entry)
n - >= 0, < size(); which indexentry - non-null; the entry to set at npublic int compareTo(CatchHandlerList other)
compareTo in interface java.lang.Comparable<CatchHandlerList>Copyright © 2020. All Rights Reserved.