@Override
    public List<String> generate(final String aValue) {
        if (aValue == null || aValue.isEmpty()) {
            return Collections.emptyList();
        }
        final List<String> result = new ArrayList<String>();
        int index;
        boolean isStackValid = true;
        initFields(aValue);

        while (isNotStackEmpty()) {
            if (isStackFull() && isStackValid) {
                result.add(createWordFromStack());
            }
            index = stack.pop();
            index++;
            if (index >= chars.length) {
                continue;
            }
            isStackValid = isNotStackContain(index);
            stack.push(index);
            if (isStackValid) {
                isStackValid = true;
                fillStack();
            }
        }

        return result;
    }