_SyncData contains the types InvitedRoom, JoinedRoom and LeftRoom. Currently they don't have a generalized type. This leads to code duplication and in some cases triplication.
All three types contain synchronisation data for a specific room. Common properties are the room ID #getId() and the state events #getState().
A generalized type RoomData (or some other name) could be
interface RoomData {
String getId(); // room ID
State getState(); // state events
}
For better distinction between the RoomData subtypes add a RoomDataKind enum
enum RoomDataKind {
JOINED,
INVITED,
LEFT
;
}
interface RoomData {
…
RoomDataKind getKind();
}