class BasicCharacterPattern implements CharacterPattern {
    private final KeyStroke result;
    private final char[] pattern;

    /**
     * Creates a new BasicCharacterPattern that matches a particular sequence of characters into a {@code KeyStroke}
     * @param result {@code KeyStroke} that this pattern will translate to
     * @param pattern Sequence of characters that translates into the {@code KeyStroke}
     */
    public BasicCharacterPattern(KeyStroke result, char... pattern) {
        this.result = result;
        this.pattern = pattern;
    }

    /**
     * Returns the characters that makes up this pattern, as an array that is a copy of the array used internally
     * @return Array of characters that defines this pattern
     */
    public char[] getPattern() {
        return Arrays.copyOf(pattern, pattern.length);
    }

    /**
     * Returns the keystroke that this pattern results in
     * @return The keystoke this pattern will return if it matches
     */
    public KeyStroke getResult() {
        return result;
    }

    @Override
    public Matching match(List<Character> seq) {<FILL_FUNCTION_BODY>}

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof BasicCharacterPattern)) {
            return false;
        }

        BasicCharacterPattern other = (BasicCharacterPattern) obj;
        return Arrays.equals(this.pattern, other.pattern);
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 53 * hash + Arrays.hashCode(this.pattern);
        return hash;
    }
}

        int size = seq.size();
        
        if(size > pattern.length) {
            return null; // nope
        }
        for (int i = 0; i < size; i++) {
            if (pattern[i] != seq.get(i)) {
                return null; // nope
            }
        }
        if (size == pattern.length) {
            return new Matching( getResult() ); // yep
        } else {
            return Matching.NOT_YET; // maybe later
        }
    
<no_super_class>