Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Inherits TreeSet< T >.
Public Member Functions | |
boolean | add (T e) |
boolean | contains (Object o) |
Float | nextPrimaryWeight () |
boolean | addAll (Collection<?extends T > c) |
Static Public Attributes | |
static final float | STEP_TO_NEXT_PRIMARY_WEIGHT = 10f |
Static Protected Member Functions | |
static float | random2Decimals () |
This extension of a TreeSet ensures that records with empty primary-weight are initialized to be added at the end.
Technically it automatically sets the primary-weight of a record if null.
boolean de.fu_berlin.inf.dpp.whiteboard.sxe.util.NodeSet< T extends NodeRecord >.add | ( | T | e | ) |
Adds the record to this set. If no primary weight is specified, it will be added to the end.
boolean de.fu_berlin.inf.dpp.whiteboard.sxe.util.NodeSet< T extends NodeRecord >.addAll | ( | Collection<?extends T > | c | ) |
boolean de.fu_berlin.inf.dpp.whiteboard.sxe.util.NodeSet< T extends NodeRecord >.contains | ( | Object | o | ) |
Note: A node without primary-weight cannot be contained
Float de.fu_berlin.inf.dpp.whiteboard.sxe.util.NodeSet< T extends NodeRecord >.nextPrimaryWeight | ( | ) |
static float de.fu_berlin.inf.dpp.whiteboard.sxe.util.NodeSet< T extends NodeRecord >.random2Decimals | ( | ) | [static, protected] |
This method is used to increase the possibility to have different primary-weight values for every peer, even on concurrent creation.
This is useful because if comparing per secondary-weight (the RIDs) only, it's more effort to insert an element in between.
final float de.fu_berlin.inf.dpp.whiteboard.sxe.util.NodeSet< T extends NodeRecord >.STEP_TO_NEXT_PRIMARY_WEIGHT = 10f [static] |
Steps between default primary-weights