
public class UserLocationTree extends LocationTreeWrapper
LocationTreeWrapper to add a Set of Users to
each node in the tree. In addition it manages the Allocation and Deallocation
of users in the Location tree.loc| Constructor and Description |
|---|
UserLocationTree(Location l)
Model the given
Location. |
| Modifier and Type | Method and Description |
|---|---|
void |
addUser(User u)
|
Set<User> |
allocateUser(User u)
Allocate a user in the
Location tree, this means the user is
logically located in all of the parent locations of this location. |
Set<User> |
deallocateUser(User u)
|
UserLocationTree |
getMaxUser(User u)
|
Set<User> |
getUserSet()
|
void |
setUserSet(Set<User> users)
Complement to
getUserSet(). |
equals, getChildren, getLocation, getParent, getRoot, isRootpublic Set<User> getUserSet()
List in the actual Location
instance, so this methods helps reformat that into a Set.public void setUserSet(Set<User> users)
getUserSet().users - public void addUser(User u)
u - public Set<User> allocateUser(User u)
Location tree, this means the user is
logically located in all of the parent locations of this location. But
all children locations must be marked too.u - the allocated user.Users by this allocation.public UserLocationTree getMaxUser(User u)
u - UserLocationTree where the user is alone, null if it
is not in the location tree, or she/he is not alone anywhere.
TODO add delegation logic here.Copyright © 2018 universAAL Consortium. All rights reserved.