MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / IonBoolLite

Class IonBoolLite

src/main/java/com/amazon/ion/impl/lite/IonBoolLite.java:13–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12
13final class IonBoolLite
14 extends IonValueLite
15 implements IonBool
16{
17 private static final int HASH_SIGNATURE =
18 IonType.BOOL.toString().hashCode();
19
20 /**
21 * Optimizes out a function call for a const result
22 */
23 protected static final int TRUE_HASH
24 = HASH_SIGNATURE ^ (16777619 * Boolean.TRUE.hashCode());
25
26 /**
27 * Optimizes out a function call for a const result
28 */
29 protected static final int FALSE_HASH
30 = HASH_SIGNATURE ^ (16777619 * Boolean.FALSE.hashCode());
31
32 /**
33 * Constructs a null bool value.
34 */
35 IonBoolLite(ContainerlessContext context, boolean isNull)
36 {
37 super(context, isNull);
38 }
39
40 IonBoolLite(IonBoolLite existing, IonContext context)
41 {
42 super(existing, context);
43 }
44
45 @Override
46 IonValueLite shallowClone(IonContext context)
47 {
48 return new IonBoolLite(this, context);
49 }
50
51 @Override
52 public IonBoolLite clone()
53 {
54 return (IonBoolLite) shallowClone(ContainerlessContext.wrap(getSystem()));
55 }
56
57 @Override
58 public IonType getTypeSlow()
59 {
60 return IonType.BOOL;
61 }
62
63 @Override
64 int hashSignature() {
65 return HASH_SIGNATURE;
66 }
67
68 @Override
69 int scalarHashCode()
70 {

Callers

nothing calls this directly

Calls 2

hashCodeMethod · 0.65
toStringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…