Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package bpiwowar.argparser.holders;
Wrapper class which ``holds'' a character value, enabling methods to return character values through arguments.
public class CharHolder extends Holder<Characterimplements {
	private static final long serialVersionUID = 1799709958161491946L;

Value of the character, set and examined by the application as needed.
	public char value;

Constructs a new CharHolder with an initial value of 0.
	public CharHolder() {
		 = 0;

Constructs a new CharHolder with a specific initial value.

c Initial character value.
	public CharHolder(char c) {
		 = c;
	public Character getValue() {
		return ;
	protected void setValue(String argumentthrows ArgParseException {
		if (argument.length() != 1)
			throw new ArgParseException("\"%s\" is not a character"argument);
		 = argument.charAt(0);
New to GrepCode? Check out our FAQ X