public final class StdTypeList extends FixedSizeList implements TypeList
TypeList.| Modifier and Type | Field and Description |
|---|---|
static StdTypeList |
BOOLEANARR_INT
non-null; the list [boolean[], int] |
static StdTypeList |
BYTEARR_INT
non-null; the list [byte[], int] |
static StdTypeList |
CHARARR_INT
non-null; the list [char[], int] |
static StdTypeList |
DOUBLE
non-null; the list [double] |
static StdTypeList |
DOUBLE_DOUBLE
non-null; the list [double, double] |
static StdTypeList |
DOUBLE_DOUBLEARR_INT
non-null; the list [double, double[], int] |
static StdTypeList |
DOUBLE_OBJECT
non-null; the list [double, Object] |
static StdTypeList |
DOUBLEARR_INT
non-null; the list [double[], int] |
static StdTypeList |
EMPTY
non-null; no-element instance |
static StdTypeList |
FLOAT
non-null; the list [float] |
static StdTypeList |
FLOAT_FLOAT
non-null; the list [float, float] |
static StdTypeList |
FLOAT_FLOATARR_INT
non-null; the list [float, float[], int] |
static StdTypeList |
FLOAT_OBJECT
non-null; the list [float, Object] |
static StdTypeList |
FLOATARR_INT
non-null; the list [float[], int] |
static StdTypeList |
INT
non-null; the list [int] |
static StdTypeList |
INT_BOOLEANARR_INT
non-null; the list [int, boolean[], int] |
static StdTypeList |
INT_BYTEARR_INT
non-null; the list [int, byte[], int] |
static StdTypeList |
INT_CHARARR_INT
non-null; the list [int, char[], int] |
static StdTypeList |
INT_INT
non-null; the list [int, int] |
static StdTypeList |
INT_INTARR_INT
non-null; the list [int, int[], int] |
static StdTypeList |
INT_OBJECT
non-null; the list [int, Object] |
static StdTypeList |
INT_SHORTARR_INT
non-null; the list [int, short[], int] |
static StdTypeList |
INTARR_INT
non-null; the list [int[], int] |
static StdTypeList |
LONG
non-null; the list [long] |
static StdTypeList |
LONG_INT
non-null; the list [long, int] |
static StdTypeList |
LONG_LONG
non-null; the list [long, long] |
static StdTypeList |
LONG_LONGARR_INT
non-null; the list [long, long[], int] |
static StdTypeList |
LONG_OBJECT
non-null; the list [long, Object] |
static StdTypeList |
LONGARR_INT
non-null; the list [long[], int] |
static StdTypeList |
OBJECT
non-null; the list [Object] |
static StdTypeList |
OBJECT_OBJECT
non-null; the list [Object, Object] |
static StdTypeList |
OBJECT_OBJECTARR_INT
non-null; the list [Object, Object[], int] |
static StdTypeList |
OBJECTARR_INT
non-null; the list [Object[], int] |
static StdTypeList |
RETURN_ADDRESS
non-null; the list [ReturnAddress] |
static StdTypeList |
SHORTARR_INT
non-null; the list [short[], int] |
static StdTypeList |
THROWABLE
non-null; the list [Throwable] |
| Constructor and Description |
|---|
StdTypeList(int size)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
compareContents(TypeList list1,
TypeList list2)
Compares the contents of the given two instances for ordering.
|
static boolean |
equalContents(TypeList list1,
TypeList list2)
Compares the contents of the given two instances for equality.
|
Type |
get(int n)
Gets the indicated element.
|
Type |
getType(int n)
Gets the indicated element.
|
int |
getWordCount()
Gets the number of 32-bit words required to hold instances of
all the elements of this list.
|
static int |
hashContents(TypeList list)
Returns a hashcode of the contents of the given list.
|
static StdTypeList |
make(Type type)
Makes a single-element instance.
|
static StdTypeList |
make(Type type0,
Type type1)
Makes a two-element instance.
|
static StdTypeList |
make(Type type0,
Type type1,
Type type2)
Makes a three-element instance.
|
static StdTypeList |
make(Type type0,
Type type1,
Type type2,
Type type3)
Makes a four-element instance.
|
void |
set(int n,
Type type)
Sets the type at the given index.
|
static java.lang.String |
toHuman(TypeList list)
Returns the given list as a comma-separated list of human forms.
|
TypeList |
withAddedType(Type type)
Returns a new instance which is identical to this one, except that
the given item is appended to the end and it is guaranteed to be
immutable.
|
StdTypeList |
withFirst(Type type)
Returns a new instance, which is the same as this instance,
except that it has an additional type prepended to the
original.
|
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, toHuman, toHuman, toString, toStringisImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutablepublic static final StdTypeList EMPTY
non-null; no-element instancepublic static final StdTypeList INT
non-null; the list [int]public static final StdTypeList LONG
non-null; the list [long]public static final StdTypeList FLOAT
non-null; the list [float]public static final StdTypeList DOUBLE
non-null; the list [double]public static final StdTypeList OBJECT
non-null; the list [Object]public static final StdTypeList RETURN_ADDRESS
non-null; the list [ReturnAddress]public static final StdTypeList THROWABLE
non-null; the list [Throwable]public static final StdTypeList INT_INT
non-null; the list [int, int]public static final StdTypeList LONG_LONG
non-null; the list [long, long]public static final StdTypeList FLOAT_FLOAT
non-null; the list [float, float]public static final StdTypeList DOUBLE_DOUBLE
non-null; the list [double, double]public static final StdTypeList OBJECT_OBJECT
non-null; the list [Object, Object]public static final StdTypeList INT_OBJECT
non-null; the list [int, Object]public static final StdTypeList LONG_OBJECT
non-null; the list [long, Object]public static final StdTypeList FLOAT_OBJECT
non-null; the list [float, Object]public static final StdTypeList DOUBLE_OBJECT
non-null; the list [double, Object]public static final StdTypeList LONG_INT
non-null; the list [long, int]public static final StdTypeList INTARR_INT
non-null; the list [int[], int]public static final StdTypeList LONGARR_INT
non-null; the list [long[], int]public static final StdTypeList FLOATARR_INT
non-null; the list [float[], int]public static final StdTypeList DOUBLEARR_INT
non-null; the list [double[], int]public static final StdTypeList OBJECTARR_INT
non-null; the list [Object[], int]public static final StdTypeList BOOLEANARR_INT
non-null; the list [boolean[], int]public static final StdTypeList BYTEARR_INT
non-null; the list [byte[], int]public static final StdTypeList CHARARR_INT
non-null; the list [char[], int]public static final StdTypeList SHORTARR_INT
non-null; the list [short[], int]public static final StdTypeList INT_INTARR_INT
non-null; the list [int, int[], int]public static final StdTypeList LONG_LONGARR_INT
non-null; the list [long, long[], int]public static final StdTypeList FLOAT_FLOATARR_INT
non-null; the list [float, float[], int]public static final StdTypeList DOUBLE_DOUBLEARR_INT
non-null; the list [double, double[], int]public static final StdTypeList OBJECT_OBJECTARR_INT
non-null; the list [Object, Object[], int]public static final StdTypeList INT_BOOLEANARR_INT
non-null; the list [int, boolean[], int]public static final StdTypeList INT_BYTEARR_INT
non-null; the list [int, byte[], int]public static final StdTypeList INT_CHARARR_INT
non-null; the list [int, char[], int]public static final StdTypeList INT_SHORTARR_INT
non-null; the list [int, short[], int]public StdTypeList(int size)
null.size - the size of the listpublic static StdTypeList make(Type type)
type - non-null; the elementnon-null; an appropriately-constructed instancepublic static StdTypeList make(Type type0, Type type1)
type0 - non-null; the first elementtype1 - non-null; the second elementnon-null; an appropriately-constructed instancepublic static StdTypeList make(Type type0, Type type1, Type type2)
type0 - non-null; the first elementtype1 - non-null; the second elementtype2 - non-null; the third elementnon-null; an appropriately-constructed instancepublic static StdTypeList make(Type type0, Type type1, Type type2, Type type3)
type0 - non-null; the first elementtype1 - non-null; the second elementtype2 - non-null; the third elementtype3 - non-null; the fourth elementnon-null; an appropriately-constructed instancepublic static java.lang.String toHuman(TypeList list)
TypeList
instances.list - non-null; the list to convertnon-null; the human formpublic static int hashContents(TypeList list)
TypeList
instances.list - non-null; the list to inspectnon-null; the hash codepublic static boolean equalContents(TypeList list1, TypeList list2)
TypeList
instances.list1 - non-null; one list to comparelist2 - non-null; another list to comparepublic static int compareContents(TypeList list1, TypeList list2)
TypeList
instances.list1 - non-null; one list to comparelist2 - non-null; another list to comparepublic Type getType(int n)
NullPointerException.public int getWordCount()
getWordCount in interface TypeList>= 0; the required number of wordspublic TypeList withAddedType(Type type)
withAddedType in interface TypeListtype - non-null; item to appendnon-null; an appropriately-constructed instancepublic Type get(int n)
NullPointerException.n - >= 0, < size(); which elementnon-null; the indicated elementpublic void set(int n,
Type type)
n - >= 0, < size(); which elementtype - non-null; the type to storepublic StdTypeList withFirst(Type type)
type - non-null; the new first elementnon-null; an appropriately-constructed instanceCopyright © 2020. All Rights Reserved.