Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## vis.util
Class Enum

    java.lang.Object
      |
      +--vis.util.Enum

All Implemented Interfaces:
  java.io.Serializable

public class Enum
extends java.lang.Object
implements java.io.Serializable

The class implements the enumerated type.

Version:
  1.0 7 July 1997
Author:
  Lawrence Rodrigues
See Also:
  Serialized Form

Constructor Summary
`Enum()`
`Enum(java.lang.Class cl)` Constructor when the enumerated elements are defined as constants in a class of interface.
`Enum(java.lang.String[] elements)` Contructor when the elements are strings.

Method Summary
`boolean` | `equals(java.lang.String member)`
`java.lang.String` | `getCurrentMember()`
`int` | `getCurrentValue()`
`java.lang.String` | `getMember(int value)`
`java.lang.String[]` | `getMembers()`
`int` | `getValue(java.lang.String member)`
`void` | `setCurrentMember(java.lang.String member)` If the input is a valid member name, sets the current value & member name.
`void` | `setCurrentValue(int value)` If the input is a valid value, sets the current value and member name.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Enum

    public Enum()

### Enum

    public Enum(java.lang.String[] elements)

  Contructor when the elements are strings.
  Parameters:
    `elements` - the elements of the enumeration.

### Enum

    public Enum(java.lang.Class cl)

  Constructor when the enumerated elements are defined as constants in a class of interface.
  Parameters:
    `cl` - the meta class for the class in which the enumeration members are defined.

Method Detail

### setCurrentValue

    public void setCurrentValue(int value)

  If the input is a valid value, sets the current value and member name.
  Parameters:
    `value` - the current value.

### getCurrentValue

    public int getCurrentValue()

  Returns:
    the currently selected value of the enumeration.

### setCurrentMember

    public void setCurrentMember(java.lang.String member)

  If the input is a valid member name, sets the current value & member name.
  Parameters:
    `member` - the member name.

### getCurrentMember

    public java.lang.String getCurrentMember()

  Returns:
    the current member of the enumeration.

### getValue

    public int getValue(java.lang.String member)

  Parameters:
    `member` - the name of the member.
  Returns:
    the actual value of that member.

### getMember

    public java.lang.String getMember(int value)

  Parameters:
    `value` - the actual value of the member.

### equals

    public boolean equals(java.lang.String member)

  Parameters:
    `member` - the member name.
  Returns:
    true if the value of the member matches the current value.

### getMembers

    public java.lang.String[] getMembers()

  Returns:
    the members of the enumerated type.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD