Class KeyListImpl

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

public class KeyListImpl extends Object implements KeyList
Implement the KeyList interface with an ArrayList.
Author:
Danny Daglas
  • Constructor Details

    • KeyListImpl

      public KeyListImpl(Set<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.
      Parameters:
      set - a Set object
  • Method Details

    • getFirstAndRemove

      public final Object getFirstAndRemove()

      getFirstAndRemove.

      Specified by:
      getFirstAndRemove in interface KeyList
      Returns:
      a Object object
    • size

      public int size()
      Retrieve the number of elements in the KeyList.
      Specified by:
      size in interface KeyList
      Returns:
      a int