Browse Source

explicit: add Model.hasLabel() method

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11162 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Joachim Klein 10 years ago
parent
commit
19a1111491
  1. 5
      prism/src/explicit/Model.java
  2. 6
      prism/src/explicit/ModelExplicit.java
  3. 6
      prism/src/explicit/SubNondetModel.java

5
prism/src/explicit/Model.java

@ -133,7 +133,10 @@ public interface Model
* Returns an empty set if there are no labels.
*/
public Set<String> getLabels();
/** Returns true if a label with the given name is attached to this model */
public boolean hasLabel(String name);
/**
* Get the total number of transitions in the model.
*/

6
prism/src/explicit/ModelExplicit.java

@ -295,6 +295,12 @@ public abstract class ModelExplicit implements Model
return labels.get(name);
}
@Override
public boolean hasLabel(String name)
{
return labels.containsKey(name);
}
@Override
public Set<String> getLabels()
{

6
prism/src/explicit/SubNondetModel.java

@ -198,6 +198,12 @@ public class SubNondetModel implements NondetModel
throw new UnsupportedOperationException();
}
@Override
public boolean hasLabel(String name)
{
throw new UnsupportedOperationException();
}
@Override
public int getNumTransitions()
{

Loading…
Cancel
Save