1- package com .proxerme .library .connection .messenger .entity . conferenceInfo ;
1+ package com .proxerme .library .connection .messenger .entity ;
22
33import android .os .Parcel ;
44import android .os .Parcelable ;
@@ -32,9 +32,9 @@ public ConferenceInfo[] newArray(int size) {
3232 @ Body (name = "count" )
3333 int participants ;
3434 @ Body (name = "timestampStart" )
35- long timestampStart ;
35+ long firstMessageTime ;
3636 @ Body (name = "timestampEnd" )
37- long timestampEnd ;
37+ long lastMessageTime ;
3838 @ Body (name = "leader" )
3939 String leaderId ;
4040
@@ -47,19 +47,19 @@ public ConferenceInfo[] newArray(int size) {
4747 /**
4848 * The Constructor.
4949 *
50- * @param topic The topic.
51- * @param participants The participants of this conference .
52- * @param timestampStart The timestamp when the conference started.
53- * @param timestampEnd The timestamp when the last message of the conference was sent.
54- * @param leaderId The user id of the conference leader.
50+ * @param topic The topic.
51+ * @param participants The amount of participants in this conferenceInfo .
52+ * @param firstMessageTime The time when the conferenceInfo started.
53+ * @param lastMessageTime The time when the last message of the conferenceInfo was sent.
54+ * @param leaderId The user id of the conferenceInfo leader.
5555 */
5656 public ConferenceInfo (@ NonNull String topic , @ IntRange (from = 2 ) int participants ,
57- @ IntRange (from = 0 ) long timestampStart , @ IntRange ( from = 0 ) long timestampEnd ,
58- @ NonNull String leaderId ) {
57+ @ IntRange (from = 0 ) long firstMessageTime ,
58+ @ IntRange ( from = 0 ) long lastMessageTime , @ NonNull String leaderId ) {
5959 this .topic = topic ;
6060 this .participants = participants ;
61- this .timestampStart = timestampStart ;
62- this .timestampEnd = timestampEnd ;
61+ this .firstMessageTime = firstMessageTime ;
62+ this .lastMessageTime = lastMessageTime ;
6363 this .leaderId = leaderId ;
6464 }
6565
@@ -71,27 +71,11 @@ public ConferenceInfo(@NonNull String topic, @IntRange(from = 2) int participant
7171 protected ConferenceInfo (Parcel in ) {
7272 topic = in .readString ();
7373 participants = in .readInt ();
74- timestampStart = in .readLong ();
75- timestampEnd = in .readLong ();
74+ firstMessageTime = in .readLong ();
75+ lastMessageTime = in .readLong ();
7676 leaderId = in .readString ();
7777 }
7878
79-
80- @ Override
81- public int describeContents () {
82- return 0 ;
83- }
84-
85- @ Override
86- public void writeToParcel (Parcel parcel , int i ) {
87- parcel .writeString (topic );
88- parcel .writeInt (participants );
89- parcel .writeLong (timestampStart );
90- parcel .writeLong (timestampEnd );
91- parcel .writeString (leaderId );
92- }
93-
94-
9579 /**
9680 * Returns the Topic.
9781 *
@@ -113,29 +97,29 @@ public int getParticipants() {
11397 }
11498
11599 /**
116- * Returns the TimestampStart .
100+ * Returns the time of the first message .
117101 *
118- * @return The TimestampStart .
102+ * @return The time .
119103 **/
120104 @ IntRange (from = 0 )
121- public long getTimestampStart () {
122- return timestampStart ;
105+ public long getFirstMessageTime () {
106+ return firstMessageTime ;
123107 }
124108
125109 /**
126- * Returns the TimestampEnd .
110+ * Returns the time of the last message .
127111 *
128- * @return The TimestampEnd .
112+ * @return The time .
129113 **/
130114 @ IntRange (from = 0 )
131- public long getTimestampEnd () {
132- return timestampEnd ;
115+ public long getLastMessageTime () {
116+ return lastMessageTime ;
133117 }
134118
135119 /**
136- * Returns the Leader .
120+ * Returns the id of the conferenceInfo leader .
137121 *
138- * @return The Leader .
122+ * @return The id .
139123 **/
140124 @ NonNull
141125 public String getLeaderId () {
@@ -151,8 +135,8 @@ public boolean equals(Object o) {
151135 ConferenceInfo that = (ConferenceInfo ) o ;
152136
153137 if (participants != that .participants ) return false ;
154- if (timestampStart != that .timestampStart ) return false ;
155- if (timestampEnd != that .timestampEnd ) return false ;
138+ if (firstMessageTime != that .firstMessageTime ) return false ;
139+ if (lastMessageTime != that .lastMessageTime ) return false ;
156140 if (!topic .equals (that .topic )) return false ;
157141 return leaderId .equals (that .leaderId );
158142
@@ -162,9 +146,23 @@ public boolean equals(Object o) {
162146 public int hashCode () {
163147 int result = topic .hashCode ();
164148 result = 31 * result + participants ;
165- result = 31 * result + (int ) (timestampStart ^ (timestampStart >>> 32 ));
166- result = 31 * result + (int ) (timestampEnd ^ (timestampEnd >>> 32 ));
149+ result = 31 * result + (int ) (firstMessageTime ^ (firstMessageTime >>> 32 ));
150+ result = 31 * result + (int ) (lastMessageTime ^ (lastMessageTime >>> 32 ));
167151 result = 31 * result + leaderId .hashCode ();
168152 return result ;
169153 }
154+
155+ @ Override
156+ public int describeContents () {
157+ return 0 ;
158+ }
159+
160+ @ Override
161+ public void writeToParcel (Parcel parcel , int i ) {
162+ parcel .writeString (topic );
163+ parcel .writeInt (participants );
164+ parcel .writeLong (firstMessageTime );
165+ parcel .writeLong (lastMessageTime );
166+ parcel .writeString (leaderId );
167+ }
170168}
0 commit comments