proj/proj1b/Palindrome.java
public boolean isPalindrome(String word, CharacterComparator cc) {
        Deque<Character> worddeque = wordToDeque(word);

        if (worddeque.size() == 0 || worddeque.size() == 1) {
            return true;
        } else {

            if (cc.equalChars(worddeque.removeFirst(), worddeque.removeLast())) {
                return isPalindrome(DequeToString(worddeque), cc);
            } else {
                return false;
            }
        }
    }
/**  Task 4: Generalized Palindrome and OffByOne
     *
     *   Generalized Palindrome.
     * */
Task 4: Generalized Palindrome and OffByOne
Generalized Palindrome.
Task 4 : Generalized Palindrome and OffByOne Generalized Palindrome .
public boolean isPalindrome(String word, CharacterComparator cc) {
        Deque<Character> worddeque = wordToDeque(word);
        if (worddeque.size() == 0 || worddeque.size() == 1) {
            return true;
        } else {
            if (cc.equalChars(worddeque.removeFirst(), worddeque.removeLast())) {
                return isPalindrome(DequeToString(worddeque), cc);
            } else {
                return false;
            }
        }
    }
public boolean isPalindrome ( String word , CharacterComparator cc ) { Deque < Character > worddeque = wordToDeque ( word ) ; if ( worddeque . size ( ) == 0 || worddeque . size ( ) == 1 ) { return true ; } else { if ( cc . equalChars ( worddeque . removeFirst ( ) , worddeque . removeLast ( ) ) ) { return isPalindrome ( DequeToString ( worddeque ) , cc ) ; } else { return false ; } } }
Task 4: Generalized Palindrome and OffByOne
   Generalized Palindrome.
Task 4 : Generalized Palindrome and OffByOne Generalized Palindrome .