List of usage examples for org.apache.commons.lang3 CharUtils isAsciiAlphaLower
public static boolean isAsciiAlphaLower(final char ch)
Checks whether the character is ASCII 7 bit alphabetic lower case.
CharUtils.isAsciiAlphaLower('a') = true CharUtils.isAsciiAlphaLower('A') = false CharUtils.isAsciiAlphaLower('3') = false CharUtils.isAsciiAlphaLower('-') = false CharUtils.isAsciiAlphaLower('\n') = false CharUtils.isAsciiAlphaLower('©') = false From source file:org.xlrnet.tibaija.processor.ExecutionEnvironment.java
/** * Register a command as an expression function in the execution environment. All programs and other commands can * use the new function once it has been registered. Every command may only be associated with at most one execution * environment. If a command is registered as a function expression (i.e. through this function) it can be used in * or as an expression and must return a value. * * @param commandName/* w w w. ja va 2 s. c o m*/ * Name of the new command under which it can be accessed. * @param command * An instance of the concrete command. */ public void registerExpressionFunction(@NotNull String commandName, @NotNull Command command) throws TIRuntimeException { checkNotNull(commandName); checkNotNull(command); checkArgument(StringUtils.isNotBlank(commandName), "Expression function name may not be blank"); Character firstChar = commandName.charAt(0); checkArgument(CharUtils.isAsciiAlphaLower(firstChar) || !CharUtils.isAsciiAlphanumeric(firstChar), "Expression function name must begin with a lowercase letter or be non-alphanumeric"); if (expressionFunction.get(commandName) != null) throw new DuplicateCommandException("Function expression name is already registered: " + commandName); if (command.getEnvironment() != null) throw new DuplicateCommandException( "New command instance is already registered in another environment"); command.setEnvironment(this); expressionFunction.put(commandName, command); LOGGER.debug("Registered new expression function '{}'", commandName); }