org.jawk.jrt
Class KeyListImpl

java.lang.Object
  extended by org.jawk.jrt.KeyListImpl
All Implemented Interfaces:
KeyList

public class KeyListImpl
extends java.lang.Object
implements KeyList

Implement the KeyList interface with an ArrayList.


Constructor Summary
KeyListImpl(java.util.Set<java.lang.Object> set)
          Convert the set to a KeyList.
 
Method Summary
 java.lang.Object getFirstAndRemove()
           
 int size()
          Retrieve the number of elements in the KeyList.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyListImpl

public KeyListImpl(java.util.Set<java.lang.Object> set)
Convert the set to a KeyList. We could have used an ArrayList directly. However, tagging the implementation with a KeyList interface improves type checking within the parsing / semantic analysis phase.

Method Detail

getFirstAndRemove

public final java.lang.Object getFirstAndRemove()
Specified by:
getFirstAndRemove in interface KeyList

size

public int size()
Description copied from interface: KeyList
Retrieve the number of elements in the KeyList.

Specified by:
size in interface KeyList