ch.elca.el4j.tests.remoting.service
Enum CalculatorOperation

java.lang.Object
  extended by java.lang.Enum<CalculatorOperation>
      extended by ch.elca.el4j.tests.remoting.service.CalculatorOperation
All Implemented Interfaces:
Serializable, Comparable<CalculatorOperation>

public enum CalculatorOperation
extends Enum<CalculatorOperation>

Possible operations in a calculator.

Author:
Martin Zeltner (MZE)
File-location:
CalculatorOperation
Last check-in date:
2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) by swismer for revision 3873

Enum Constant Summary
ADDITION
          Operator for an addition.
DIVISION
          Operator for a division.
MULTIPLICATION
          Operator for a multiplication.
SUBTRACTION
          Operator for a subtraction.
 
Method Summary
static CalculatorOperation valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CalculatorOperation[] 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

ADDITION

public static final CalculatorOperation ADDITION
Operator for an addition.


SUBTRACTION

public static final CalculatorOperation SUBTRACTION
Operator for a subtraction.


MULTIPLICATION

public static final CalculatorOperation MULTIPLICATION
Operator for a multiplication.


DIVISION

public static final CalculatorOperation DIVISION
Operator for a division.

Method Detail

values

public static CalculatorOperation[] 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 (CalculatorOperation c : CalculatorOperation.values())
    System.out.println(c);

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

valueOf

public static CalculatorOperation 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


Copyright © 2005-2011 ELCA. All Rights Reserved.