Sort members.

This commit is contained in:
Gary Gregory 2022-03-21 10:18:17 -04:00
parent e5910c7a03
commit 318cc6ec4d
1 changed files with 30 additions and 30 deletions

View File

@ -33,7 +33,11 @@ class GmtTimeZone extends TimeZone {
// Serializable! // Serializable!
static final long serialVersionUID = 1L; static final long serialVersionUID = 1L;
private static StringBuilder twoDigits(final StringBuilder sb, final int n) {
return sb.append((char) ('0' + (n / 10))).append((char) ('0' + (n % 10)));
}
private final int offset; private final int offset;
private final String zoneId; private final String zoneId;
GmtTimeZone(final boolean negate, final int hours, final int minutes) { GmtTimeZone(final boolean negate, final int hours, final int minutes) {
@ -54,23 +58,12 @@ class GmtTimeZone extends TimeZone {
// @formatter:on // @formatter:on
} }
private static StringBuilder twoDigits(final StringBuilder sb, final int n) {
return sb.append((char) ('0' + (n / 10))).append((char) ('0' + (n % 10)));
}
@Override @Override
public int getOffset(final int era, final int year, final int month, final int day, final int dayOfWeek, final int milliseconds) { public boolean equals(final Object other) {
return offset; if (!(other instanceof GmtTimeZone)) {
} return false;
}
@Override return zoneId == ((GmtTimeZone) other).zoneId;
public void setRawOffset(final int offsetMillis) {
throw new UnsupportedOperationException();
}
@Override
public int getRawOffset() {
return offset;
} }
@Override @Override
@ -79,18 +72,13 @@ class GmtTimeZone extends TimeZone {
} }
@Override @Override
public boolean useDaylightTime() { public int getOffset(final int era, final int year, final int month, final int day, final int dayOfWeek, final int milliseconds) {
return false; return offset;
} }
@Override @Override
public boolean inDaylightTime(final Date date) { public int getRawOffset() {
return false; return offset;
}
@Override
public String toString() {
return "[GmtTimeZone id=\"" + zoneId + "\",offset=" + offset + ']';
} }
@Override @Override
@ -99,10 +87,22 @@ class GmtTimeZone extends TimeZone {
} }
@Override @Override
public boolean equals(final Object other) { public boolean inDaylightTime(final Date date) {
if (!(other instanceof GmtTimeZone)) { return false;
return false; }
}
return zoneId == ((GmtTimeZone) other).zoneId; @Override
public void setRawOffset(final int offsetMillis) {
throw new UnsupportedOperationException();
}
@Override
public String toString() {
return "[GmtTimeZone id=\"" + zoneId + "\",offset=" + offset + ']';
}
@Override
public boolean useDaylightTime() {
return false;
} }
} }