Package org.flag4j.util
Enum Class Axis2D
- All Implemented Interfaces:
Serializable
,Comparable<Axis2D>
,Constable
Simple enum class for two-dimensional axis. The row axis has ordinal 0 and the column axis has ordinal 1.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int[]
allAxes()
Gets an array of all axes ordinals.static int
col()
Get the ordinal of the column axis in 2D.static int
row()
Get the ordinal of the row axis in 2D.static Axis2D
Returns the enum constant of this class with the specified name.static Axis2D[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ROW
Row of 2D tensor. -
COL
Column of 2D tensor
-
-
Constructor Details
-
Axis2D
private Axis2D()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
row
public static int row()Get the ordinal of the row axis in 2D.- Returns:
- The ordinal of the row axis in 2D.
-
col
public static int col()Get the ordinal of the column axis in 2D.- Returns:
- The ordinal of the column axis in 2D.
-
allAxes
public static int[] allAxes()Gets an array of all axes ordinals.- Returns:
- An array of all axes ordinals.
-