Skip to content

Commit d9d60f8

Browse files
cpovirkGoogle Java Core Libraries
authored and
Google Java Core Libraries
committed
Continuing preparing to make immutable-collection Collector APIs available in guava-android (but don't do so yet).
This CL is further progress toward #6567 RELNOTES=n/a PiperOrigin-RevId: 579462040
1 parent 9b8035d commit d9d60f8

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

android/guava/src/com/google/common/collect/ImmutableMultiset.java

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
@ElementTypesAreNonnullByDefault
5757
public abstract class ImmutableMultiset<E> extends ImmutableMultisetGwtSerializationDependencies<E>
5858
implements Multiset<E> {
59+
5960
/**
6061
* Returns the empty immutable multiset.
6162
*
@@ -636,4 +637,6 @@ public ImmutableMultiset<E> build() {
636637
return new RegularImmutableMultiset<E>(contents);
637638
}
638639
}
640+
641+
private static final long serialVersionUID = 0xdecaf;
639642
}

android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,9 @@ private void readObject(ObjectInputStream stream) throws InvalidObjectException
683683
}
684684

685685
/**
686-
* Not supported. Use {@link ImmutableSortedMultiset#naturalOrder}, which offers better
687-
* type-safety, instead. This method exists only to hide {@link ImmutableMultiset#builder} from
688-
* consumers of {@code ImmutableSortedMultiset}.
686+
* Not supported. Use {@link #naturalOrder}, which offers better type-safety, instead. This method
687+
* exists only to hide {@link ImmutableMultiset#builder} from consumers of {@code
688+
* ImmutableSortedMultiset}.
689689
*
690690
* @throws UnsupportedOperationException always
691691
* @deprecated Use {@link ImmutableSortedMultiset#naturalOrder}, which offers better type-safety.
@@ -804,4 +804,6 @@ public static <E> ImmutableSortedMultiset<E> of(
804804
public static <Z> ImmutableSortedMultiset<Z> copyOf(Z[] elements) {
805805
throw new UnsupportedOperationException();
806806
}
807+
808+
private static final long serialVersionUID = 0xdecaf;
807809
}

android/guava/src/com/google/common/collect/ImmutableSortedSet.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
@ElementTypesAreNonnullByDefault
6363
public abstract class ImmutableSortedSet<E> extends ImmutableSet<E>
6464
implements NavigableSet<E>, SortedIterable<E> {
65+
6566
static <E> RegularImmutableSortedSet<E> emptySet(Comparator<? super E> comparator) {
6667
if (Ordering.natural().equals(comparator)) {
6768
return (RegularImmutableSortedSet<E>) RegularImmutableSortedSet.NATURAL_EMPTY_SET;
@@ -851,9 +852,8 @@ Object writeReplace() {
851852
}
852853

853854
/**
854-
* Not supported. Use {@link ImmutableSortedSet#naturalOrder}, which offers better type-safety,
855-
* instead. This method exists only to hide {@link ImmutableSet#builder} from consumers of {@code
856-
* ImmutableSortedSet}.
855+
* Not supported. Use {@link #naturalOrder}, which offers better type-safety, instead. This method
856+
* exists only to hide {@link ImmutableSet#builder} from consumers of {@code ImmutableSortedSet}.
857857
*
858858
* @throws UnsupportedOperationException always
859859
* @deprecated Use {@link ImmutableSortedSet#naturalOrder}, which offers better type-safety.

guava/src/com/google/common/collect/ImmutableMultiset.java

+2
Original file line numberDiff line numberDiff line change
@@ -660,4 +660,6 @@ Object readResolve() {
660660

661661
private static final long serialVersionUID = 0;
662662
}
663+
664+
private static final long serialVersionUID = 0xcafebabe;
663665
}

guava/src/com/google/common/collect/ImmutableSortedMultiset.java

+2
Original file line numberDiff line numberDiff line change
@@ -762,4 +762,6 @@ public static <E> ImmutableSortedMultiset<E> of(
762762
public static <Z> ImmutableSortedMultiset<Z> copyOf(Z[] elements) {
763763
throw new UnsupportedOperationException();
764764
}
765+
766+
private static final long serialVersionUID = 0xcafebabe;
765767
}

0 commit comments

Comments
 (0)