1   package com.atlassian.webtest.ui.keys;
2   
3   import java.util.List;
4   import java.util.Set;
5   
6   /**
7    * <p>
8    * Represents a keyboard input to type into test pages. A key sequence contains one of more keys
9    * represented by instances of the {@link Key} class. It may
10   * also be meant to type in with some modifier keys pressed down, which is represented by
11   * the {@link #withPressed()} method.
12   *
13   */
14  public interface KeySequence
15  {
16      /**
17       * An immutable list of keys to be typed.
18       *
19       * @return keys to type into the target test page element
20       */
21      List<Key> keys();
22  
23      /**
24       * A set of {@link SpecialKey}s that should be pressed during entering this sequence's {@link #keys()}. If empty,
25       * no special keys should be pressed during typing.
26       *
27       * @return special keys to be pressed. Should never be <code>null</code> 
28       */
29      Set<ModifierKey> withPressed();
30  
31  }