Browse Source

APSet: add asList() convenience method

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11276 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Joachim Klein 10 years ago
parent
commit
7ddf026889
  1. 11
      prism/src/jltl2ba/APSet.java

11
prism/src/jltl2ba/APSet.java

@ -22,6 +22,8 @@
package jltl2ba; package jltl2ba;
import java.util.Collections;
import java.util.List;
import java.util.Vector; import java.util.Vector;
import java.util.Iterator; import java.util.Iterator;
import java.io.PrintStream; import java.io.PrintStream;
@ -83,6 +85,15 @@ public class APSet implements Iterable<String>
return vector.contains(s); return vector.contains(s);
} }
/**
* Returns an (unmodifiable) List view of this AP set.
* To modify this APSet, use the {@code addAP} method.
*/
public List<String> asList()
{
return Collections.unmodifiableList(vector);
}
/** /**
* Get the size of this set * Get the size of this set
* @return the number of APs in this set. * @return the number of APs in this set.

Loading…
Cancel
Save