Class ParsedPolicy

java.lang.Object
org.kigalisim.lang.program.ParsedPolicy

public class ParsedPolicy extends Object
Record of a policy parsed from the source of a QubecTalk program.

Contains the applications defined in this policy with their associated substances.

  • Constructor Details

    • ParsedPolicy

      public ParsedPolicy(String name, Iterable<ParsedApplication> applications)
      Create a new record of a policy.
      Parameters:
      name - The name of the policy parsed.
      applications - The applications defined in this policy.
  • Method Details

    • getName

      public String getName()
      Get the name of this policy.
      Returns:
      The name of this policy.
    • getApplications

      public Set<String> getApplications()
      Get the names of all applications defined in this policy.
      Returns:
      Set of application names.
    • getApplication

      public ParsedApplication getApplication(String name)
      Get a specific application by name.
      Parameters:
      name - The name of the application to retrieve.
      Returns:
      The application with the specified name.
      Throws:
      IllegalArgumentException - if no application with the given name exists.