Package com.io7m.smfj.core
Class SMFSupportedSizes
- java.lang.Object
-
- com.io7m.smfj.core.SMFSupportedSizes
-
public final class SMFSupportedSizes extends java.lang.ObjectThe supported sizes in bits of each type.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcheckFloatSupported(java.lang.String type, int bits)Check if a floating point type with the given size is supported.static intcheckIntegerSignedSupported(java.lang.String type, int bits)Check if a signed integer type with the given size is supported.static intcheckIntegerUnsignedSupported(java.lang.String type, int bits)Check if an unsigned integer type with the given size is supported.static booleanisFloatSupported(int bits)static booleanisIntegerSignedSupported(int bits)static booleanisIntegerUnsignedSupported(int bits)
-
-
-
Method Detail
-
isIntegerUnsignedSupported
public static boolean isIntegerUnsignedSupported(int bits)
- Parameters:
bits- The size in bits- Returns:
trueif an unsigned integer type with the given size is supported
-
checkIntegerUnsignedSupported
public static int checkIntegerUnsignedSupported(java.lang.String type, int bits) throws java.lang.UnsupportedOperationExceptionCheck if an unsigned integer type with the given size is supported.- Parameters:
type- The name of the type (such as "triangle indices")bits- The size in bits- Returns:
bits- Throws:
java.lang.UnsupportedOperationException- If the size is not supported
-
isIntegerSignedSupported
public static boolean isIntegerSignedSupported(int bits)
- Parameters:
bits- The size in bits- Returns:
trueif a signed integer type with the given size is supported
-
checkIntegerSignedSupported
public static int checkIntegerSignedSupported(java.lang.String type, int bits) throws java.lang.UnsupportedOperationExceptionCheck if a signed integer type with the given size is supported.- Parameters:
type- The name of the type (such as "triangle indices")bits- The size in bits- Returns:
bits- Throws:
java.lang.UnsupportedOperationException- If the size is not supported
-
isFloatSupported
public static boolean isFloatSupported(int bits)
- Parameters:
bits- The size in bits- Returns:
trueif a floating point type with the given size is supported
-
checkFloatSupported
public static int checkFloatSupported(java.lang.String type, int bits) throws java.lang.UnsupportedOperationExceptionCheck if a floating point type with the given size is supported.- Parameters:
type- The name of the type (such as "triangle indices")bits- The size in bits- Returns:
bits- Throws:
java.lang.UnsupportedOperationException- If the size is not supported
-
-