1 package it.unical.mat.embasp.languages.asp;
3 import java.lang.reflect.InvocationTargetException;
4 import java.util.Collections;
5 import java.util.HashMap;
6 import java.util.HashSet;
21 private final List<String> value;
23 private final Map<Integer, Integer> weight_map;
25 private Set<Object> atoms;
27 public AnswerSet(
final List<String> output) {
29 weight_map =
new HashMap<>();
32 public AnswerSet(
final List<String> value,
final Map<Integer, Integer> weightMap) {
34 weight_map = weightMap;
43 return Collections.unmodifiableList(value);
46 public List <String> getValue() {
55 public Set<Object>
getAtoms() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException,
56 InstantiationException {
58 atoms =
new HashSet <> ();
60 for(
final String atom : value) {
71 public Map<Integer, Integer> getLevelWeight() {
79 return Collections.unmodifiableMap(weight_map);
83 public String toString() {
84 return value.toString();