Code example for TimeZone

Methods: getID

0
    if (o instanceof TimeZone == false)
    { 
      throw new BeanException("Failed to convert object of type " + o.getClass() + ": Not a timezone.");
    } 
    final TimeZone tz = (TimeZone) o;
    return tz.getID();
  } 
 
  /** 
   * Converts a string to a property value. 
   * 
   * @param s the string. 
   * @return a property value. 
   * @throws BeanException if there was an error during the conversion. 
   */ 
  public Object toPropertyValue(final String s) throws BeanException
  { 
    if (s == null)
    { 
      throw new NullPointerException();
    }