public final class ResourceList extends Object
Resource
s that an activity needs.
There are two ways to access resources. Read and write.
As with usual reader/writer pattern, multiple read accesses can
co-exist concurrently, but write access requires exclusive access
(the number of allowed concurrent write activity is determined by
Resource.numConcurrentWrite
.
Modifier and Type | Field and Description |
---|---|
static ResourceList |
EMPTY
Empty resource list.
|
Constructor and Description |
---|
ResourceList() |
Modifier and Type | Method and Description |
---|---|
Resource |
getConflict(ResourceList that)
Returns the resource in this list that's colliding with the given resource list.
|
boolean |
isCollidingWith(ResourceList that)
Checks if this resource list and that resource list has any conflicting
resource access.
|
ResourceList |
r(Resource r)
Adds a resource for read access.
|
String |
toString() |
static ResourceList |
union(Collection<ResourceList> lists)
Creates union of all resources.
|
static ResourceList |
union(ResourceList... lists)
Creates union of all resources.
|
ResourceList |
w(Resource r)
Adds a resource for write access.
|
public static final ResourceList EMPTY
public static ResourceList union(ResourceList... lists)
public static ResourceList union(Collection<ResourceList> lists)
public ResourceList r(Resource r)
public ResourceList w(Resource r)
public boolean isCollidingWith(ResourceList that)
public Resource getConflict(ResourceList that)
Copyright © 2004–2021. All rights reserved.