Package gov.nasa.jpl.resource
Class ArrayedResource<V extends ResourceContainer>
java.lang.Object
gov.nasa.jpl.resource.ArrayedResource<V>
- Type Parameters:
V
- Parameterized type must be either another ArrayedResource or a base Resource
- All Implemented Interfaces:
ResourceContainer
public abstract class ArrayedResource<V extends ResourceContainer>
extends Object
implements ResourceContainer
The base ArrayedResource class allows adapters to declare many base resources in one line,
and then index into them in activities with string indices.
-
Constructor Summary
ConstructorsConstructorDescriptionArrayedResource
(String[] entries, String[]... higherDimensionIndices) ArrayedResource
(String subsystem, String[] entries, String[]... higherDimensionIndices) ArrayedResource
(String subsystem, String units, String[] entries, String[]... higherDimensionIndices) ArrayedResource
(String subsystem, String units, String interpolation, ArrayedResource toIntegrate, long dtInMilliseconds) ArrayedResource
(String subsystem, String units, String interpolation, ArrayedResource toIntegrate, Duration dt) ArrayedResource
(String subsystem, String units, String interpolation, String[] entries, String[]... higherDimensionIndices) -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsIndex
(String index) String[]
void
Once the name is assigned, we add the resource (or resource units inside arrayed resource) to the global resource mapvoid
setIndices
(List<String> index) Set the name of the index of this object inside the containing arrayed resourcevoid
This names either the Resource or ArrayedResource with the provided name, which is gotten from reflectionvoid
update()
Updates either just the resource or all resources in the container
-
Constructor Details
-
ArrayedResource
-
ArrayedResource
public ArrayedResource(String subsystem, String units, String interpolation, ArrayedResource toIntegrate, long dtInMilliseconds) -
ArrayedResource
public ArrayedResource(String subsystem, String units, String interpolation, ArrayedResource toIntegrate, Duration dt) -
ArrayedResource
-
ArrayedResource
-
ArrayedResource
-
-
Method Details
-
update
public void update()Description copied from interface:ResourceContainer
Updates either just the resource or all resources in the container- Specified by:
update
in interfaceResourceContainer
-
get
-
containsIndex
-
setName
Description copied from interface:ResourceContainer
This names either the Resource or ArrayedResource with the provided name, which is gotten from reflection- Specified by:
setName
in interfaceResourceContainer
- Parameters:
s
- The string you want the instance to be named
-
setIndices
Description copied from interface:ResourceContainer
Set the name of the index of this object inside the containing arrayed resource- Specified by:
setIndices
in interfaceResourceContainer
- Parameters:
index
- Index name
-
getEntries
-
registerResource
public void registerResource()Description copied from interface:ResourceContainer
Once the name is assigned, we add the resource (or resource units inside arrayed resource) to the global resource map- Specified by:
registerResource
in interfaceResourceContainer
-