forked from FZUSESPR21W/meeting-system-team6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
class Message { | ||
int user_id; | ||
int sub_id; | ||
String users; | ||
Message(int user_id,int sub_id,String users) { | ||
this.sub_id=sub_id; | ||
this.user_id=user_id; | ||
this.users=users; | ||
} | ||
|
||
public int getSub_id() { | ||
return sub_id; | ||
} | ||
|
||
public int getUser_id() { | ||
return user_id; | ||
} | ||
|
||
public void setSub_id(int sub_id) { | ||
this.sub_id = sub_id; | ||
} | ||
|
||
public void setUser_id(int user_id) { | ||
this.user_id = user_id; | ||
} | ||
|
||
public String getUsers() { | ||
return users; | ||
} | ||
|
||
public void setUsers(String users) { | ||
this.users = users; | ||
} | ||
|
||
public void handleMsg(int id) { | ||
String temp=""; | ||
String[]ss = users.split(","); | ||
for(int i=0;i<ss.length;i++) | ||
{ | ||
if(!Integer.valueOf(id).toString().equals(ss[i])) { | ||
temp += ss[i]; | ||
temp+=","; | ||
} | ||
} | ||
temp=temp.substring(0,temp.length()-1); | ||
users=temp; | ||
} | ||
} |