ICU-8345 Public API classes need formal JavaDoc comments with API status. Add them to the new Freezable method implementations in TimeZone and its subclasses. Also fixed a couple of compiler warnings (unnecessary type cast).

X-SVN-Rev: 31066
This commit is contained in:
Yoshito Umaoka 2011-12-08 17:08:53 +00:00
parent 94a9854969
commit a10116996d
4 changed files with 50 additions and 26 deletions

View File

@ -717,15 +717,19 @@ public class RuleBasedTimeZone extends BasicTimeZone {
// Freezable stuffs
private transient boolean isFrozen = false;
/* (non-Javadoc)
* @see com.ibm.icu.util.TimeZone#isFrozen()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public boolean isFrozen() {
return isFrozen;
}
/* (non-Javadoc)
* @see com.ibm.icu.util.TimeZone#freeze()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public TimeZone freeze() {
complete();
@ -733,8 +737,10 @@ public class RuleBasedTimeZone extends BasicTimeZone {
return this;
}
/* (non-Javadoc)
* @see com.ibm.icu.util.TimeZone#cloneAsThawed()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public TimeZone cloneAsThawed() {
RuleBasedTimeZone tz = (RuleBasedTimeZone)super.cloneAsThawed();

View File

@ -1402,23 +1402,29 @@ public class SimpleTimeZone extends BasicTimeZone {
// Freezable stuffs
private transient boolean isFrozen = false;
/* (non-Javadoc)
* @see com.ibm.icu.util.TimeZone#isFrozen()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public boolean isFrozen() {
return isFrozen;
}
/* (non-Javadoc)
* @see com.ibm.icu.util.TimeZone#freeze()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public TimeZone freeze() {
isFrozen = true;
return this;
}
/* (non-Javadoc)
* @see com.ibm.icu.util.TimeZone#cloneAsThawed()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public TimeZone cloneAsThawed() {
SimpleTimeZone tz = (SimpleTimeZone)super.cloneAsThawed();

View File

@ -750,7 +750,7 @@ abstract public class TimeZone implements Serializable, Cloneable, Freezable<Tim
TimeZoneLogger.warning(
"\"" +ID + "\" is a bogus id so timezone is falling back to Etc/Unknown(GMT).");
}
result = (TimeZone)UNKNOWN_ZONE;
result = UNKNOWN_ZONE;
}
return frozen ? result : result.cloneAsThawed();
@ -906,7 +906,7 @@ abstract public class TimeZone implements Serializable, Cloneable, Freezable<Tim
defaultZone = getFrozenTimeZone(temp.getID());
}
}
return (TimeZone) defaultZone.cloneAsThawed();
return defaultZone.cloneAsThawed();
}
/**
@ -1094,22 +1094,28 @@ abstract public class TimeZone implements Serializable, Cloneable, Freezable<Tim
// Freezable stuffs
/* (non-Javadoc)
* @see com.ibm.icu.util.Freezable#isFrozen()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public boolean isFrozen() {
return false;
}
/* (non-Javadoc)
* @see com.ibm.icu.util.Freezable#freeze()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public TimeZone freeze() {
throw new UnsupportedOperationException("Needs to be implemented by the subclass.");
}
/* (non-Javadoc)
* @see com.ibm.icu.util.Freezable#cloneAsThawed()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public TimeZone cloneAsThawed() {
try {

View File

@ -2072,23 +2072,29 @@ public class VTimeZone extends BasicTimeZone {
// Freezable stuffs
private transient boolean isFrozen = false;
/* (non-Javadoc)
* @see com.ibm.icu.util.TimeZone#isFrozen()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public boolean isFrozen() {
return isFrozen;
}
/* (non-Javadoc)
* @see com.ibm.icu.util.TimeZone#freeze()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public TimeZone freeze() {
isFrozen = true;
return this;
}
/* (non-Javadoc)
* @see com.ibm.icu.util.TimeZone#cloneAsThawed()
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
*/
public TimeZone cloneAsThawed() {
VTimeZone vtz = (VTimeZone)super.cloneAsThawed();