com.aptana.ide.lexer
Class StaticEnumerationMap

java.lang.Object
  extended by com.aptana.ide.lexer.StaticEnumerationMap
All Implemented Interfaces:
IEnumerationMap

public class StaticEnumerationMap
extends java.lang.Object
implements IEnumerationMap

Author:
Kevin Lindsey

Constructor Summary
StaticEnumerationMap(java.lang.Class enumeration)
          StaticMap
 
Method Summary
 int getIntValue(java.lang.String name)
          Returns the index of the given category name.
 java.lang.String getName(int index)
          Returns the enumeration name associated with the given index.
 java.lang.String[] getNames()
          Returns an array of all names in this enumeration map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticEnumerationMap

public StaticEnumerationMap(java.lang.Class enumeration)
StaticMap

Parameters:
enumeration -
Method Detail

getIntValue

public int getIntValue(java.lang.String name)
Description copied from interface: IEnumerationMap
Returns the index of the given category name. A -1 may be rerturned if the category does not exist in the enumeration

Specified by:
getIntValue in interface IEnumerationMap
Returns:
int, possibly -1
See Also:
IEnumerationMap.getIntValue(java.lang.String)

getName

public java.lang.String getName(int index)
Description copied from interface: IEnumerationMap
Returns the enumeration name associated with the given index. A null value may be returned if the index does not exist in the enumeration

Specified by:
getName in interface IEnumerationMap
Returns:
String or null
See Also:
IEnumerationMap.getName(int)

getNames

public java.lang.String[] getNames()
Description copied from interface: IEnumerationMap
Returns an array of all names in this enumeration map. The order is undefined

Specified by:
getNames in interface IEnumerationMap
Returns:
String[], may be empty
See Also:
IEnumerationMap.getNames()