/*
 * Copyright 2015 Olivier Grégoire <fror@users.noreply.github.com>.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package be.fror.password.rule;

import static be.fror.password.rule.AsciiCharMatcher.anyOfAscii;

/**
 *
 * @author Olivier Grégoire &lt;fror@users.noreply.github.com&gt;
 */
class RuleConstants {

  static final String ASCII_LOWERCASE_LETTER_CHARACTERS = "abcdefghijklmnopqrstuvwxyz";
  static final AsciiCharMatcher ASCII_LOWERCASE_LETTER_MATCHER = anyOfAscii(ASCII_LOWERCASE_LETTER_CHARACTERS);

  static final String ASCII_UPPERCASE_LETTER_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  static final AsciiCharMatcher ASCII_UPPERCASE_LETTER_MATCHER = anyOfAscii(ASCII_UPPERCASE_LETTER_CHARACTERS);

  static final String ASCII_LETTER_CHARACTERS = ASCII_LOWERCASE_LETTER_CHARACTERS + ASCII_UPPERCASE_LETTER_CHARACTERS;
  static final AsciiCharMatcher ASCII_LETTER_MATCHER = ASCII_LOWERCASE_LETTER_MATCHER.or(ASCII_UPPERCASE_LETTER_MATCHER);

  static final String ASCII_DIGIT_CHARACTERS = "0123456789";
  static final AsciiCharMatcher ASCII_DIGIT_MATCHER = anyOfAscii(ASCII_DIGIT_CHARACTERS);

  static final String ASCII_ALPHANUMERIC_CHARACTERS = ASCII_LETTER_CHARACTERS + ASCII_DIGIT_CHARACTERS;
  static final AsciiCharMatcher ASCII_ALPHANUMERIC_MATCHER = ASCII_LETTER_MATCHER.or(ASCII_DIGIT_MATCHER);

  static final String ASCII_SYMBOL_CHARACTERS = ",.;:?!+-*/=[](){}_@&\"`$#%^~|<>\\";
  static final AsciiCharMatcher ASCII_SYMBOL_MATCHER = anyOfAscii(ASCII_SYMBOL_CHARACTERS);
}

@@ -1,10 +1,11 @@
 /*
+%0D
 %0A * Copy
@@ -64,19 +64,21 @@
 ub.com%3E.
+%0D
 %0A *
+%0D
 %0A * Lice
@@ -136,16 +136,17 @@
 cense%22);
+%0D
 %0A * you 
@@ -205,16 +205,17 @@
 License.
+%0D
 %0A * You 
@@ -249,19 +249,21 @@
 cense at
+%0D
 %0A *
+%0D
 %0A *     
@@ -305,19 +305,21 @@
 ENSE-2.0
+%0D
 %0A *
+%0D
 %0A * Unle
@@ -381,16 +381,17 @@
 software
+%0D
 %0A * dist
@@ -451,16 +451,17 @@
 %22 BASIS,
+%0D
 %0A * WITH
@@ -528,16 +528,17 @@
 implied.
+%0D
 %0A * See 
@@ -600,16 +600,17 @@
 ions and
+%0D
 %0A * limi
@@ -635,20 +635,22 @@
 License.
+%0D
 %0A */
+%0D
 %0Apackage
@@ -672,17 +672,19 @@
 rd.rule;
-%0A
+%0D%0A%0D
 %0Aimport 
@@ -744,16 +744,20 @@
 cii;
-%0A
+%0D%0A%0D
 %0A/**
+%0D
 %0A *
+%0D
 %0A * 
@@ -818,20 +818,22 @@
 .com&gt;
+%0D
 %0A */
+%0D
 %0Aclass R
@@ -846,17 +846,19 @@
 stants %7B
-%0A
+%0D%0A%0D
 %0A  stati
@@ -937,16 +937,17 @@
 uvwxyz%22;
+%0D
 %0A  stati
@@ -1042,33 +1042,35 @@
 TER_CHARACTERS);
-%0A
+%0D%0A%0D
 %0A  static final 
@@ -1141,16 +1141,17 @@
 UVWXYZ%22;
+%0D
 %0A  stati
@@ -1246,33 +1246,35 @@
 TER_CHARACTERS);
-%0A
+%0D%0A%0D
 %0A  static final 
@@ -1368,32 +1368,33 @@
 TTER_CHARACTERS;
+%0D
 %0A  static final 
@@ -1491,33 +1491,35 @@
 LETTER_MATCHER);
-%0A
+%0D%0A%0D
 %0A  static final 
@@ -1563,16 +1563,17 @@
 456789%22;
+%0D
 %0A  stati
@@ -1654,17 +1654,19 @@
 ACTERS);
-%0A
+%0D%0A%0D
 %0A  stati
@@ -1761,16 +1761,17 @@
 RACTERS;
+%0D
 %0A  stati
@@ -1869,17 +1869,19 @@
 ATCHER);
-%0A
+%0D%0A%0D
 %0A  stati
@@ -1944,16 +1944,17 @@
 )%7B%7D_@&%5C%22
+'
 %60$#%25%5E~%7C%3C
@@ -1958,16 +1958,17 @@
 ~%7C%3C%3E%5C%5C%22;
+%0D
 %0A  stati
@@ -2055,7 +2055,9 @@
 RS);
+%0D
 %0A%7D
+%0D
 %0A

Fix the symbols list to include the missing apostrophe ( ' ).