Package org.kigalisim.lang.program
Class ParsedPolicy
java.lang.Object
org.kigalisim.lang.program.ParsedPolicy
Record of a policy parsed from the source of a QubecTalk program.
Contains the applications defined in this policy with their associated substances.
-
Constructor Summary
ConstructorsConstructorDescriptionParsedPolicy(String name, Iterable<ParsedApplication> applications) Create a new record of a policy. -
Method Summary
Modifier and TypeMethodDescriptiongetApplication(String name) Get a specific application by name.Get the names of all applications defined in this policy.getName()Get the name of this policy.
-
Constructor Details
-
ParsedPolicy
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
Get the name of this policy.- Returns:
- The name of this policy.
-
getApplications
Get the names of all applications defined in this policy.- Returns:
- Set of application names.
-
getApplication
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.
-