1 33 34 package edu.rice.cs.drjava.config; 35 36 40 public class IntegerOption extends Option<Integer > { 41 42 45 public IntegerOption(String key, Integer def) { 46 super(key,def); 47 } 48 49 54 public Integer parse(String s) { 55 try { return new Integer (Integer.parseInt(s)); } 56 catch (NumberFormatException e) { 57 throw new OptionParseException(name, s, "Must be a valid integer value."); 58 } 59 } 60 } 61 | Popular Tags |