private static Object fixObj(Object booleanObj) { if (booleanObj instanceof Byte) { byte byteValue = (Byte) booleanObj; boolean booleanValue = byteValue != 0x00; return new Boolean(booleanValue); } return booleanObj; } }
private Object toObject (String key, String value) { if (key.endsWith("b")) return new Boolean(Boolean.parseBoolean(value)); if (key.endsWith("i")) return new Integer(Integer.parseInt(value)); if (key.endsWith("l")) return new Long(Long.parseLong(value)); if (key.endsWith("f")) return new Float(Float.parseFloat(value)); return value; }
private Object toObject (String key, String value) { if (key.endsWith("b")) return new Boolean(Boolean.parseBoolean(value)); if (key.endsWith("i")) return new Integer(Integer.parseInt(value)); if (key.endsWith("l")) return new Long(Long.parseLong(value)); if (key.endsWith("f")) return new Float(Float.parseFloat(value)); return value; }
/** * Returns the hash code for this permission object. If two DmtPermission * objects are equal according to the {@link #equals(Object)} method, then * calling this method on each of the two DmtPermission objects must produce * the same integer result. * * @return hash code for this permission object */ public int hashCode() { return new Integer(mask).hashCode() ^ new Boolean(prefixPath).hashCode() ^ path.hashCode(); }
> typeof new Boolean(false) "object" > typeof new String("foo") "object" > typeof new Number(42) "object"
Object getValue(ClassLoader cl, ClassPool cp, Method m) { return new Boolean(getValue()); }
/** fully qualified Boolean instantiation in a method. **/ Boolean getBoolean() { return new Boolean(true); }
/** fully qualified Boolean instantiation in a method. **/ Boolean getBoolean() { return new java.lang.Boolean(true); }
/** fully qualified Boolean instantiation in a method. **/ Boolean getBoolean() { return new Boolean(true); }
/** fully qualified Boolean instantiation in a method. **/ Boolean getBoolean() { return new Boolean(true); }
/** fully qualified Boolean instantiation in a method. **/ Boolean getBoolean() { return new Boolean(true); }
/** fully qualified Boolean instantiation in a method. **/ Boolean getBoolean() { return new Boolean(true); }
/** fully qualified Boolean instantiation in a method. **/ Boolean getBoolean() { return new Boolean(true); }
/** fully qualified Boolean instantiation in a method. **/ Boolean getBoolean() { return new Boolean(true); }
/** * Get a boolean associated with the given configuration key. * * @param key The configuration key. * @param defaultValue The default value. * @return The associated boolean. * @throws ClassCastException is thrown if the key maps to an * object that is not a Boolean. */ public boolean getBoolean(String key, boolean defaultValue) { return getBoolean(key, new Boolean(defaultValue)).booleanValue(); }
Boolean getBoolean() { return new java.lang.Boolean(true); }
@Generates private Boolean generateBooleanObject() { return new Boolean(generateBoolean()); }
@Setup(Iteration) public void setup() { for (int i = 0; i < ARRAY_SIZE; i++) { boolean value = ThreadLocalRandom.current().nextBoolean(); boolean isNull = ThreadLocalRandom.current().nextBoolean(); primitives[i] = value; boxed[i] = value; constants[i] = isNull ? null : value; objects[i] = isNull ? null : new Boolean(value); } } }
@Test @SuppressWarnings( {"BooleanConstructorCall"}) public void testBooleanType() { final Boolean original = Boolean.TRUE; final Boolean copy = new Boolean( true ); final Boolean different = Boolean.FALSE; runBasicTests( BooleanType.INSTANCE, original, copy, different ); runBasicTests( NumericBooleanType.INSTANCE, original, copy, different ); runBasicTests( YesNoType.INSTANCE, original, copy, different ); runBasicTests( TrueFalseType.INSTANCE, original, copy, different ); }