Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Inherits Serializable.
Public Member Functions | |
ColorIDSet (Collection< String > ids) | |
int | getColor (String id) |
int | getFavoriteColor (String id) |
Set< String > | getParticipants () |
long | getTimestamp () |
boolean | isAvailable (int colorID) |
boolean | equals (Object o) |
int | hashCode () |
String | toString () |
void | resetTimestamp () |
void | setColor (String id, int colorID) throws IllegalArgumentException |
void | setFavoriteColor (String id, int colorID) throws IllegalArgumentException |
ColorIDSet | extendSet (Collection< String > ids) |
Package Functions | |
ColorIDSet (Map< String, UserColorID > colorIDs) | |
void | setTimestamp (long time) |
Represents a combination of user colors. It is used to give the same combination of participants the same colors in each session.
This class is NOT thread safe.
Updating or retrieving the set via the provided methods of the ColorIDSetStorage class must not be called while using the methods that are provided by this class.
de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.ColorIDSet | ( | Map< String, UserColorID > | colorIDs | ) | [package] |
Creates a ColorIDSet.
colorIDs | a map from ids to color ids |
de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.ColorIDSet | ( | Collection< String > | ids | ) |
Creates a ColorIDSet and sets color for each id to { UserColorID.UNKNOWN}
ids |
boolean de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.equals | ( | Object | o | ) |
Two color ID sets are considered equals if they contain the same set of JIDs.
ColorIDSet de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.extendSet | ( | Collection< String > | ids | ) |
Creates a new set, containing the added ids.
ids |
int de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.getColor | ( | String | id | ) |
Gets the color id for a given id.
id |
int de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.getFavoriteColor | ( | String | id | ) |
Gets the favorite color id for a given id.
id |
Set<String> de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.getParticipants | ( | ) |
Gets a new copy of the participants.
long de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.getTimestamp | ( | ) |
Tells when the set was used last.
int de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.hashCode | ( | ) |
boolean de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.isAvailable | ( | int | colorID | ) |
Returns whether colorId is not yet in use of this set
colorID |
false
if colorId is in use true
otherwise, because it is still available void de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.resetTimestamp | ( | ) |
Resets the timestamp to the current system.
void de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.setColor | ( | String | id, |
int | colorID | ||
) | throws IllegalArgumentException |
Set the colorId of the set for a given user id.
id | |
colorID |
void de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.setFavoriteColor | ( | String | id, |
int | colorID | ||
) | throws IllegalArgumentException |
Set the favorite color id of the set for the given user id.
id | |
colorID |
void de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.setTimestamp | ( | long | time | ) | [package] |
Sets the Timestamp.
time | the timestamp |
String de.fu_berlin.inf.dpp.editor.colorstorage.ColorIDSet.toString | ( | ) |