code: public final List<WarningsGroup> validate(List<ICalComponent> hierarchy, ICalVersion version) {
  		List<WarningsGroup> warnings = new ArrayList<WarningsGroup>();
  
  		//validate this component
  		List<ValidationWarning> warningsBuf = new ArrayList<ValidationWarning>(0);
  		validate(hierarchy, version, warningsBuf);
  		if (!warningsBuf.isEmpty()) {
  			warnings.add(new WarningsGroup(this, hierarchy, warningsBuf));
  		}
  
  		//add this component to the hierarchy list
  		//copy the list so other validate() calls aren't effected
  		hierarchy = new ArrayList<ICalComponent>(hierarchy);
  		hierarchy.add(this);
  
  		//validate properties
  		for (ICalProperty property : properties.values()) {
  			List<ValidationWarning> propWarnings = property.validate(hierarchy, version);
  			if (!propWarnings.isEmpty()) {
  				warnings.add(new WarningsGroup(property, hierarchy, propWarnings));
  			}
  		}
  
  		//validate sub-components
  		for (ICalComponent component : components.values()) {
  			warnings.addAll(component.validate(hierarchy, version));
  		}
  
  		return warnings;
  	}
docs: <p>
  Checks this component for data consistency problems or deviations from
  the specifications.
  </p>
  <p>
  The existence of validation warnings will not prevent the component
  object from being written to a data stream. Syntactically-correct output
  will still be produced. However, the consuming application may have
  trouble interpreting some of the data due to the presence of these
  warnings.
  </p>
  <p>
  These problems can largely be avoided by reading the Javadocs of the
  component and property classes, or by being familiar with the iCalendar
  standard.
  </p>
  @param hierarchy the hierarchy of components that the component belongs
  to
  @param version the version to validate against
  @see ICalendar#validate
  @return a list of warnings or an empty list if no problems were found