| Modifier and Type | Class and Description |
|---|---|
static class |
NumberT.Kind
The number kind.
|
| Modifier and Type | Field and Description |
|---|---|
static IntegerT |
BYTE
The canonical signed byte type.
|
static IntegerT |
CHAR
The canonical char type.
|
static FloatT |
DOUBLE
The canonical double type.
|
static FloatT |
DOUBLE_COMPLEX
The canonical double complex type.
|
static FloatT |
FLOAT
The canonical float type.
|
static FloatT |
FLOAT_COMPLEX
The canonical float complex type.
|
static IntegerT |
INT
The canonical int type.
|
protected NumberT.Kind |
kind
The kind.
|
static IntegerT |
LONG
The canonical signed long type.
|
static FloatT |
LONG_DOUBLE
The canonical long double type.
|
static FloatT |
LONG_DOUBLE_COMPLEX
The canonical long double complex type.
|
static IntegerT |
LONG_LONG
The canonical signed long long type.
|
static IntegerT |
S_CHAR
The canonical signed char type.
|
static IntegerT |
S_INT
The canonical signed int type.
|
static IntegerT |
SHORT
The canonical short type.
|
static IntegerT |
U_CHAR
The canonical unsigned char type.
|
static IntegerT |
U_INT
The cannical unsigned int type.
|
static IntegerT |
U_LONG
The canonical unsigned long type.
|
static IntegerT |
U_LONG_LONG
The canonical unsigned long long type.
|
static IntegerT |
U_SHORT
The canonical unsigned short type.
|
| Constructor and Description |
|---|
NumberT(NumberT.Kind kind)
Create a new number type.
|
NumberT(Type template,
NumberT.Kind kind)
Create a new number type.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equal(NumberT.Kind k1,
NumberT.Kind k2)
Determine whether the specified kinds equal each other.
|
static boolean |
equalIgnoringSign(NumberT.Kind k1,
NumberT.Kind k2)
Determine whether the specified kinds equal each other, modulo
their signs.
|
boolean |
equals(java.lang.Object o)
Determine whether this type equals the specified object.
|
NumberT.Kind |
getKind()
Get the kind.
|
int |
hashCode() |
boolean |
hasKind(NumberT.Kind kind)
Determine whether this number has the specified kind.
|
boolean |
isNumber()
Determine whether this type is a number.
|
boolean |
isSigned()
Determine whether this number is signed.
|
NumberT |
toNumber()
Get this type as a number.
|
java.lang.String |
toString()
Return a human readable representation of this node.
|
void |
write(java.lang.Appendable out)
Write a human readable representation to the specified
appendable.
|
addAttribute, annotate, attribute, attribute, attribute, attributes, cast, checkNotSealed, constant, constant, copy, copy, deannotate, getAttribute, getAttribute, getConstant, getConstant, getLanguage, getLanguage, getLocation, getLocation, getScope, getScope, getShape, getShape, hasAlias, hasAnnotated, hasAttribute, hasAttribute, hasAttribute, hasAttribute, hasAttributes, hasConstant, hasConstant, hasEnum, hasEnumerator, hasError, hasInstantiated, hasLanguage, hasLanguage, hasLocation, hasLocation, hasParameterized, hasScope, hasScope, hasShape, hasShape, hasStructOrUnion, hasTag, hasTagged, hasVariable, hasWTag, isAlias, isAnnotated, isArray, isBoolean, isClass, isConcrete, isDerived, isEnum, isEnumerator, isError, isFloat, isFunction, isInstantiated, isInteger, isInterface, isInternal, isInternalParameter, isLabel, isMethod, isNamedParameter, isPackage, isParameter, isParameterized, isPointer, isSealed, isStruct, isTuple, isUnion, isUnit, isVariable, isVariant, isVoid, isWildcard, isWrapped, language, locate, locate, mark, properties, removeAttribute, removeProperty, resolve, resolve, scope, seal, seal, setLocation, setLocation, setProperty, shape, shape, tag, toAlias, toAnnotated, toArray, toBoolean, toClass, toEnum, toEnumerator, toFloat, toFunction, toInstantiated, toInteger, toInterface, toInternal, toInternalParameter, toLabel, toMethod, toNamedParameter, toPackage, toParameter, toParameterized, toPointer, toStruct, toStructOrUnion, toTagged, toTuple, toUnion, toUnit, toVariable, toVariant, toVoid, toWildcard, toWrapped, trace, wtagadd, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getName, getNode, getProperty, getString, getStringProperty, getTokenText, hasName, hasProperty, hasTraversal, indexOf, isAnnotation, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, remove, set, size, strip, toAnnotation, toList, toTokenpublic static final IntegerT BYTE
public static final IntegerT CHAR
public static final IntegerT S_CHAR
public static final IntegerT U_CHAR
public static final IntegerT SHORT
public static final IntegerT U_SHORT
public static final IntegerT INT
public static final IntegerT S_INT
public static final IntegerT U_INT
public static final IntegerT LONG
public static final IntegerT U_LONG
public static final IntegerT LONG_LONG
public static final IntegerT U_LONG_LONG
public static final FloatT FLOAT
public static final FloatT DOUBLE
public static final FloatT LONG_DOUBLE
public static final FloatT FLOAT_COMPLEX
public static final FloatT DOUBLE_COMPLEX
public static final FloatT LONG_DOUBLE_COMPLEX
protected final NumberT.Kind kind
public NumberT(NumberT.Kind kind)
kind - The kind.public NumberT(Type template, NumberT.Kind kind)
template - The type whose annotations to copy.kind - The kind.public boolean isNumber()
Typepublic boolean hasKind(NumberT.Kind kind)
equal(Kind,Kind) to perform the kind
comparison.kind - The kind.true if this number has the specified kind.public NumberT.Kind getKind()
public boolean isSigned()
true if this number is signed.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
int and signed int kinds.equals in class java.lang.Objecto - The object.true if this type equals the object.public void write(java.lang.Appendable out)
throws java.io.IOException
NodeObject.toString().public java.lang.String toString()
NodeNode.write(Appendable).public static boolean equal(NumberT.Kind k1, NumberT.Kind k2)
k1 - The first kind.k2 - The second kind.true if the kinds are equal.public static boolean equalIgnoringSign(NumberT.Kind k1, NumberT.Kind k2)
k1 - The first kind.k2 - The second kind.true if the kinds are equal modulo their
signs.Copyright © 2014. All Rights Reserved.