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 Details

  • 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 interface ResourceContainer
    • get

      public V get(String index)
    • containsIndex

      public boolean containsIndex(String index)
    • setName

      public void setName(String s)
      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 interface ResourceContainer
      Parameters:
      s - The string you want the instance to be named
    • setIndices

      public void setIndices(List<String> index)
      Description copied from interface: ResourceContainer
      Set the name of the index of this object inside the containing arrayed resource
      Specified by:
      setIndices in interface ResourceContainer
      Parameters:
      index - Index name
    • getEntries

      public String[] 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 interface ResourceContainer