Skip to content
Browse files

created a contact entry object that will be used to manager the list …

…of contacts for a group.
  • Loading branch information...
1 parent b70bf61 commit 66db27de707e23f223ea77a9b29e0aea4f8147c8 Mike Novak committed Jun 3, 2011
Showing with 61 additions and 0 deletions.
  1. +61 −0 sdk/src/com/groupme/sdk/ContactEntry.java
View
61 sdk/src/com/groupme/sdk/ContactEntry.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2011 Mindless Dribble, Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.groupme.sdk;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class ContactEntry implements Parcelable {
+ private String mName;
+ private String mNumber;
+
+ public ContactEntry(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public String getName() {
+ return mName;
+ }
+
+ public String getNumber() {
+ return mNumber;
+ }
+
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeString(mName);
+ dest.writeString(mNumber);
+ }
+
+ public void readFromParcel(Parcel in) {
+ mName = in.readString();
+ mNumber = in.readString();
+ }
+
+ public int describeContents() {
+ return 0;
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ public ContactEntry createFromParcel(Parcel in) {
+ return new ContactEntry(in);
+ }
+
+ public ContactEntry[] newArray(int size) {
+ return new ContactEntry[size];
+ }
+ };
+
+}

0 comments on commit 66db27d

Please sign in to comment.
Something went wrong with that request. Please try again.