Z3
Z3_symbol_kind.java
Go to the documentation of this file.
1
5package com.microsoft.z3.enumerations;
6
7import java.util.HashMap;
8import java.util.Map;
9
13public enum Z3_symbol_kind {
16
17 private final int intValue;
18
20 this.intValue = v;
21 }
22
23 // Cannot initialize map in constructor, so need to do it lazily.
24 // Easiest thread-safe way is the initialization-on-demand holder pattern.
25 private static class Z3_symbol_kind_MappingHolder {
26 private static final Map<Integer, Z3_symbol_kind> intMapping = new HashMap<>();
27 static {
28 for (Z3_symbol_kind k : Z3_symbol_kind.values())
29 intMapping.put(k.toInt(), k);
30 }
31 }
32
33 public static final Z3_symbol_kind fromInt(int v) {
34 Z3_symbol_kind k = Z3_symbol_kind_MappingHolder.intMapping.get(v);
35 if (k != null) return k;
36 throw new IllegalArgumentException("Illegal value " + v + " for Z3_symbol_kind");
37 }
38
39 public final int toInt() { return this.intValue; }
40}
41
static final Z3_symbol_kind fromInt(int v)