View Javadoc

1   package com.atlassian.selenium.keyboard;
2   
3   import java.util.List;
4   
5   /**
6    * TODO: Document this class / interface here
7    *
8    */
9   public class KeyEventSequence
10  {
11      public KeyEventSequence(final String identifier,final List<KeyEvent> keyEvents)
12      {
13          this.keyEvents = keyEvents;
14          this.identifier = identifier;
15      }
16  
17      public KeyEventSequence()
18      {
19      }
20  
21      private String identifier; // as a string so we can have nice names for special keys like DOWNARROW
22      private List<KeyEvent> keyEvents;
23  
24      public List<KeyEvent> getKeyEvents()
25      {
26          return keyEvents;
27      }
28  
29  
30      public String getIdentifier()
31      {
32          return identifier;
33      }
34  
35      public Character getCharacter()
36      {
37          if (identifier.length() == 1)
38          {
39              return identifier.charAt(0);
40          }
41          else
42          {
43              return null;
44          }
45      }
46  
47  }