File tree 1 file changed +13
-0
lines changed
serialization/xml/src/main/java/net/automatalib/serialization/xml/ra
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 18
18
19
19
import java .io .InputStream ;
20
20
import java .math .BigDecimal ;
21
+ import java .util .ArrayList ;
21
22
import java .util .Collection ;
22
23
import java .util .HashSet ;
23
24
import java .util .LinkedHashMap ;
@@ -85,6 +86,18 @@ public class RegisterAutomatonImporter {
85
86
public Collection <DataType <?>> getDataTypes () {
86
87
return typeMap .values ();
87
88
}
89
+ public <T > Collection <DataType <T >> getDataTypes (Class <T > clazz ) {
90
+ final Collection <DataType <?>> values = this .typeMap .values ();
91
+ final List <DataType <T >> result = new ArrayList <>(values .size ());
92
+
93
+ for (DataType <?> value : values ) {
94
+ if (value .getBase ().equals (clazz )) {
95
+ result .add ((DataType <T >) value );
96
+ }
97
+ }
98
+
99
+ return result ;
100
+ }
88
101
89
102
public RegisterAutomatonImporter (InputStream is ) {
90
103
loadModel (is );
You can’t perform that action at this time.
0 commit comments