2 *******************************************************************************
3 * Copyright (C) 2007, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
7 package com.ibm.icu.dev.test.util;
9 import com.ibm.icu.util.Calendar;
15 public class CalendarFieldsSet extends FieldsSet {
21 public CalendarFieldsSet() {
22 super(DebugUtilitiesData.UCalendarDateFields,-1);
25 public boolean matches(Calendar cal, CalendarFieldsSet diffSet) {
27 for(int i=0;i<fieldCount();i++) {
29 int calVal = cal.get(i);
30 if(calVal != get(i)) {
32 diffSet.set(i, calVal);
40 * set the specified fields on this calendar. Doesn't clear first. Returns any errors the cale
42 public void setOnCalendar(Calendar cal) {
43 for(int i=0;i<fieldCount();i++) {
50 protected void handleParseValue(FieldsSet inheritFrom, int field, String substr) {
51 if(field == Calendar.MONTH) {
52 parseValueEnum(DebugUtilitiesData.UCalendarMonths, inheritFrom, field, substr);
53 // will fallback to default.
55 parseValueDefault(inheritFrom, field, substr);