Initial version -- added millennium read funcionality
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
package com.google.maps.android.clustering.algo;
|
||||
|
||||
import com.google.android.gms.maps.model.LatLng;
|
||||
import com.google.maps.android.clustering.Cluster;
|
||||
import com.google.maps.android.clustering.ClusterItem;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashSet;
|
||||
import kotlinx.serialization.json.internal.AbstractJsonLexerKt;
|
||||
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class StaticCluster<T extends ClusterItem> implements Cluster<T> {
|
||||
private final LatLng mCenter;
|
||||
private final Collection<T> mItems = new LinkedHashSet();
|
||||
|
||||
public StaticCluster(LatLng latLng) {
|
||||
this.mCenter = latLng;
|
||||
}
|
||||
|
||||
public boolean add(T t) {
|
||||
return this.mItems.add(t);
|
||||
}
|
||||
|
||||
@Override // com.google.maps.android.clustering.Cluster
|
||||
public LatLng getPosition() {
|
||||
return this.mCenter;
|
||||
}
|
||||
|
||||
public boolean remove(T t) {
|
||||
return this.mItems.remove(t);
|
||||
}
|
||||
|
||||
@Override // com.google.maps.android.clustering.Cluster
|
||||
public Collection<T> getItems() {
|
||||
return this.mItems;
|
||||
}
|
||||
|
||||
@Override // com.google.maps.android.clustering.Cluster
|
||||
public int getSize() {
|
||||
return this.mItems.size();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "StaticCluster{mCenter=" + this.mCenter + ", mItems.size=" + this.mItems.size() + AbstractJsonLexerKt.END_OBJ;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.mCenter.hashCode() + this.mItems.hashCode();
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof StaticCluster)) {
|
||||
return false;
|
||||
}
|
||||
StaticCluster staticCluster = (StaticCluster) obj;
|
||||
return staticCluster.mCenter.equals(this.mCenter) && staticCluster.mItems.equals(this.mItems);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user