+/*
+ * <p>iParapheur Android<br/>
+ * Copyright (C) 2016 Adullact-Projet.</p>
+ *
+ * <p>This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.</p>
+ *
+ * <p>This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.</p>
+ *
+ * <p>You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.</p>
+ */
package org.adullact.iparapheur.model;
import android.os.Bundle;
import android.os.Parcelable;
import android.util.SparseArray;
+
public class Document implements Parcelable {
public static Creator<Document> CREATOR = new Creator<Document>() {
mIsMainDocument = isMainDocument;
}
- @SuppressWarnings("unchecked")
- private Document(Parcel in) {
+ @SuppressWarnings("unchecked") private Document(Parcel in) {
mId = in.readString();
mDossierId = in.readString();
mName = in.readString();
// <editor-fold desc="Parcelable">
- @Override
- public int describeContents() {
+ @Override public int describeContents() {
return 0;
}
- @Override
- public void writeToParcel(Parcel dest, int flags) {
+ @Override public void writeToParcel(Parcel dest, int flags) {
Bundle bundle = new Bundle();
bundle.putSparseParcelableArray("mPagesAnnotations", mPagesAnnotations);
dest.writeString(mId);
// </editor-fold desc="Parcelable">
- @Override
- public String toString() {
+ @Override public String toString() {
return "{Document id:" + mId + " name:" + mName + " isMainDoc:" + mIsMainDocument + "}";
}
- @Override
- public boolean equals(Object o) {
+ @Override public boolean equals(Object o) {
return (o != null) && (o instanceof Document) && (mId.contentEquals(((Document) o).getId()));
}
}