// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.olio.data.object.user; import android.content.ContentResolver; import android.os.Parcel; import com.olio.communication.messages.MessagePayload; import com.olio.olios.model.SerializedUserRecordMessagePayload; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; // Referenced classes of package com.olio.data.object.user: // Location public class Locations extends SerializedUserRecordMessagePayload { public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { public MessagePayload createFromParcel(Parcel parcel) { return MessagePayload.unpackParcel(parcel); } public volatile Object createFromParcel(Parcel parcel) { return createFromParcel(parcel); } public MessagePayload[] newArray(int i) { return new Locations[i]; } public volatile Object[] newArray(int i) { return newArray(i); } }; public static final String TYPE_NAME = "locations"; private static final long serialVersionUID = 0x1e12f1a73aede462L; private final Map locations = new HashMap(); public Locations() { } private String generateKey(String s) { return s.trim().toLowerCase(); } public static Locations get(ContentResolver contentresolver) { Locations locations1 = (Locations)SerializedUserRecordMessagePayload.get("locations", contentresolver); contentresolver = locations1; if (locations1 == null) { contentresolver = new Locations(); } return contentresolver; } public void addLocation(Location location) { locations.put(generateKey(location.getDisplayName()), location); } public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } else { Locations locations1 = (Locations)obj; return (new EqualsBuilder()).appendSuper(super.equals(obj)).append(locations, locations1.locations).isEquals(); } } public com.olio.olios.model.record.SerializedRecord.SerializedRecordObject getDefaultObject() { return new Locations(); } public int getEndPointsFlags() { return 4; } public Location getLocation(String s) { s = generateKey(s); return (Location)locations.get(s); } public Map getLocations() { return Collections.unmodifiableMap(locations); } public String getObjectId() { return "locations"; } public int getSourcePointsFlags() { return 2; } public int hashCode() { return (new HashCodeBuilder(17, 37)).appendSuper(super.hashCode()).append(locations).toHashCode(); } public void removeLocation(Location location) { locations.remove(generateKey(location.getDisplayName())); } public String typeName() { return "locations"; } }