com.github.croesch.micro_debug.gui.components.basic
Enum NumberLabel.STYLE

java.lang.Object
  extended by java.lang.Enum<NumberLabel.STYLE>
      extended by com.github.croesch.micro_debug.gui.components.basic.NumberLabel.STYLE
All Implemented Interfaces:
Serializable, Comparable<NumberLabel.STYLE>
Enclosing class:
NumberLabel

public static enum NumberLabel.STYLE
extends Enum<NumberLabel.STYLE>

Different styles to format numbers.

Since:
Date: Mar 14, 2012
Author:
croesch

Enum Constant Summary
BINARY
          binary (base 2) format
DECIMAL
          decimal number format
HEXADECIMAL
          hexadecimal (base 16) format
 
Method Summary
abstract  String getRepresentation(int num)
          Returns the String representation of the given number.
static NumberLabel.STYLE valueOf(String name)
          Returns the enum constant of this type with the specified name.
static NumberLabel.STYLE[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DECIMAL

public static final NumberLabel.STYLE DECIMAL
decimal number format


HEXADECIMAL

public static final NumberLabel.STYLE HEXADECIMAL
hexadecimal (base 16) format


BINARY

public static final NumberLabel.STYLE BINARY
binary (base 2) format

Method Detail

values

public static NumberLabel.STYLE[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (NumberLabel.STYLE c : NumberLabel.STYLE.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static NumberLabel.STYLE valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getRepresentation

@NotNull
public abstract String getRepresentation(int num)
Returns the String representation of the given number.

Parameters:
num - the number to format to String with this number format
Returns:
the String representing the given number in this style
Since:
Date: Mar 14, 2012


Copyright © 2012. All Rights Reserved.