Code example for TimeZone

Methods: clone

0
    if (serviceId == null)
      throw new IllegalArgumentException("serviceId cannot be null");
    if (timeZone == null)
      throw new IllegalArgumentException("timeZone cannot be null");
    this.id = serviceId;
    this.timeZone = (TimeZone) timeZone.clone();
  } 
 
  public AgencyAndId getId() { 
    return id;
  } 
 
  public TimeZone getTimeZone() {
    return timeZone;
  } 
 
  @Override 
  public String toString() {
    return "ServiceId(id=" + id + " timeZone=" + timeZone.getID() + ")";
  }