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