class CommandArgsAccessor {

    /**
     * Get the first encoded key for cluster command routing.
     *
     * @param commandArgs must not be null.
     * @return the first encoded key or {@code null}.
     */
    @SuppressWarnings("unchecked")
    public static <K, V> ByteBuffer encodeFirstKey(CommandArgs<K, V> commandArgs) {

        for (SingularArgument singularArgument : commandArgs.singularArguments) {

            if (singularArgument instanceof CommandArgs.KeyArgument) {
                return commandArgs.codec.encodeKey(((CommandArgs.KeyArgument<K, V>) singularArgument).key);
            }
        }

        return null;
    }

    /**
     * Get the first {@link String} argument.
     *
     * @param commandArgs must not be null.
     * @return the first {@link String} argument or {@code null}.
     */
    @SuppressWarnings("unchecked")
    public static <K, V> String getFirstString(CommandArgs<K, V> commandArgs) {

        for (SingularArgument singularArgument : commandArgs.singularArguments) {

            if (singularArgument instanceof StringArgument) {
                return ((StringArgument) singularArgument).val;
            }
        }

        return null;
    }

    /**
     * Get the first {@code char[]}-array argument.
     *
     * @param commandArgs must not be null.
     * @return the first {@link String} argument or {@code null}.
     */
    @SuppressWarnings("unchecked")
    public static <K, V> char[] getFirstCharArray(CommandArgs<K, V> commandArgs) {

        for (SingularArgument singularArgument : commandArgs.singularArguments) {

            if (singularArgument instanceof CharArrayArgument) {
                return ((CharArrayArgument) singularArgument).val;
            }
        }

        return null;
    }

    /**
     * Get the all {@link String} arguments.
     *
     * @param commandArgs must not be null.
     * @return the first {@link String} argument or {@code null}.
     * @since 6.0
     */
    public static <K, V> List<String> getStringArguments(CommandArgs<K, V> commandArgs) {<FILL_FUNCTION_BODY>}

    /**
     * Get the all {@code char[]} arguments.
     *
     * @param commandArgs must not be null.
     * @return the first {@link String} argument or {@code null}.
     * @since 6.0
     */
    public static <K, V> List<char[]> getCharArrayArguments(CommandArgs<K, V> commandArgs) {

        List<char[]> args = new ArrayList<>();

        for (SingularArgument singularArgument : commandArgs.singularArguments) {

            if (singularArgument instanceof CharArrayArgument) {
                args.add(((CharArrayArgument) singularArgument).val);
            }

            if (singularArgument instanceof StringArgument) {
                args.add(((StringArgument) singularArgument).val.toCharArray());
            }
        }

        return args;
    }

    /**
     * Get the first {@link Long integer} argument.
     *
     * @param commandArgs must not be null.
     * @return the first {@link Long integer} argument or {@code null}.
     */
    @SuppressWarnings("unchecked")
    public static <K, V> Long getFirstInteger(CommandArgs<K, V> commandArgs) {

        for (SingularArgument singularArgument : commandArgs.singularArguments) {

            if (singularArgument instanceof CommandArgs.IntegerArgument) {
                return ((CommandArgs.IntegerArgument) singularArgument).val;
            }
        }

        return null;
    }

}


        List<String> args = new ArrayList<>();

        for (SingularArgument singularArgument : commandArgs.singularArguments) {

            if (singularArgument instanceof StringArgument) {
                args.add(((StringArgument) singularArgument).val);
            }
        }

        return args;
    
<no_super_class>