ca.nengo.model
Enum Units
java.lang.Object
java.lang.Enum<Units>
ca.nengo.model.Units
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Units>
public enum Units
- extends java.lang.Enum<Units>
Models units for physical quantities. We use this class to model both fundamental units
(e.g. 's') and composite units (e.g. 'spikes/s').
- Author:
- Bryan Tripp
Field Summary |
java.lang.String |
myName
|
Method Summary |
java.lang.String |
toString()
|
static Units[] |
uniform(Units units,
int length)
Returns an array of Units in which all Units are the same. |
static Units |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Units[] |
values()
Returns an array containing the constants of this enum type, in
the order they're declared. |
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
S
public static final Units S
mV
public static final Units mV
uA
public static final Units uA
uAcm2
public static final Units uAcm2
ACU
public static final Units ACU
AVU
public static final Units AVU
UNK
public static final Units UNK
SPIKES
public static final Units SPIKES
SPIKES_PER_S
public static final Units SPIKES_PER_S
N
public static final Units N
Nm
public static final Units Nm
M
public static final Units M
RAD
public static final Units RAD
M_PER_S
public static final Units M_PER_S
RAD_PER_S
public static final Units RAD_PER_S
myName
public java.lang.String myName
values
public static final Units[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(Units c : Units.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static Units valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Enum<Units>
uniform
public static Units[] uniform(Units units,
int length)
- Returns an array of Units in which all Units are the same.
- Parameters:
units
- Units to be returned in every elementlength
- Number of elements
- Returns:
- Array of given length with given Units in every element