1 30 31 package de.susebox.jtopas.spi; 32 33 34 import de.susebox.jtopas.TokenizerProperty; 38 import de.susebox.jtopas.TokenizerProperties; 39 import de.susebox.jtopas.Flags; 40 41 42 46 63 public class StandardSeparatorHandler implements SeparatorHandler { 64 65 72 public StandardSeparatorHandler(TokenizerProperties props) { 73 _properties = props; 74 } 75 76 83 public boolean isSeparator(char testChar) { 84 String separators; 85 86 if (_properties != null && (separators = _properties.getWhitespaces()) != null) { 87 if (_properties.isFlagSet(Flags.F_NO_CASE)) { 88 return separators.toLowerCase().indexOf(Character.toLowerCase(testChar)) >= 0; 89 } else { 90 return separators.indexOf(testChar) >= 0; 91 } 92 } else { 93 return false; 94 } 95 } 96 97 98 102 106 private TokenizerProperties _properties = null; 107 } 108 | Popular Tags |