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 TypeMethodDescriptionbooleancontainsIndex(String index) String[]voidOnce the name is assigned, we add the resource (or resource units inside arrayed resource) to the global resource mapvoidsetIndices(List<String> index) Set the name of the index of this object inside the containing arrayed resourcevoidThis names either the Resource or ArrayedResource with the provided name, which is gotten from reflectionvoidupdate()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:ResourceContainerUpdates either just the resource or all resources in the container- Specified by:
updatein interfaceResourceContainer
-
get
-
containsIndex
-
setName
Description copied from interface:ResourceContainerThis names either the Resource or ArrayedResource with the provided name, which is gotten from reflection- Specified by:
setNamein interfaceResourceContainer- Parameters:
s- The string you want the instance to be named
-
setIndices
Description copied from interface:ResourceContainerSet the name of the index of this object inside the containing arrayed resource- Specified by:
setIndicesin interfaceResourceContainer- Parameters:
index- Index name
-
getEntries
-
registerResource
public void registerResource()Description copied from interface:ResourceContainerOnce the name is assigned, we add the resource (or resource units inside arrayed resource) to the global resource map- Specified by:
registerResourcein interfaceResourceContainer
-