List of usage examples for java.lang Boolean FALSE
Boolean FALSE
To view the source code for java.lang Boolean FALSE.
Click Source Link
From source file:Main.java
public static Boolean isFrameModified(RootPaneContainer frame) { synchronized (frame) { JRootPane rootPane = frame.getRootPane(); Object obj = rootPane.getClientProperty(WINDOW_MODIFIED); if (obj == null || !(obj instanceof Boolean)) { return Boolean.FALSE; }/*www . j av a 2 s.co m*/ return (Boolean) obj; } }
From source file:Main.java
public static Boolean parseBooleanValue(String valueText) { if (valueText != null) { // if we have to check for value true if ("true".equals(valueText) || "enabled".equals(valueText) || "on".equals(valueText)) { return Boolean.TRUE; }// ww w .j a v a 2s. c o m if ("false".equals(valueText) || "disabled".equals(valueText) || "off".equals(valueText)) { return Boolean.FALSE; } } return null; }
From source file:Main.java
public static Boolean parseBooleanValue(final String valueText) { if (valueText != null) { // if we have to check for value true if ("true".equals(valueText) || "enabled".equals(valueText) || "on".equals(valueText)) { return Boolean.TRUE; } else if ("false".equals(valueText) || "disabled".equals(valueText) || "off".equals(valueText)) { return Boolean.FALSE; }/*from w w w. j a v a2 s. c o m*/ } return null; }
From source file:Main.java
/** * Puts passed value to passed {@link Map} instance on passed key of such * does not contained or its associated key does not equals passed value * /*from www . ja v a2 s . co m*/ * @param map * @param key * @param value */ public static <K, V> void checkAndAdd(Map<K, V> map, K key, V value) { boolean contained = map.containsKey(key) && value.equals(map.get(key)); if (Boolean.FALSE.equals(contained)) { map.put(key, value); } }
From source file:Main.java
/** * <p>Negates the specified boolean.</p> * /*from w ww.j a v a 2 s. c o m*/ * <p>If <code>null</code> is passed in, <code>null</code> will be returned.</p> * * <pre> * BooleanUtils.negate(Boolean.TRUE) = Boolean.FALSE; * BooleanUtils.negate(Boolean.FALSE) = Boolean.TRUE; * BooleanUtils.negate(null) = null; * </pre> * * @param bool the Boolean to negate, may be null * @return the negated Boolean, or <code>null</code> if <code>null</code> input */ public static Boolean negate(Boolean bool) { if (bool == null) { return null; } return (bool.booleanValue() ? Boolean.FALSE : Boolean.TRUE); }
From source file:com.dungnv.vfw5.base.utils.test.DateTimeUtilsTest.java
@Test public void getSysdate() throws Exception { String nowTime = DateTimeUtils.getSysDateTime(Boolean.FALSE); String nowTimeGMT = DateTimeUtils.getSysDateTime(Boolean.TRUE); System.out.println("nowTime " + nowTime); System.out.println("nowTimeGMT " + nowTimeGMT); Assert.assertNotEquals("nowTime: " + nowTime + ", nowTimeGMT: " + nowTimeGMT, nowTime, nowTimeGMT); // org.springframework.orm.hibernate4.LocalSessionFactoryBean test = new org.springframework.orm.hibernate4.LocalSessionFactoryBean(); // test.setHibernateProperties(hibernateProperties); // java.util.Properties }
From source file:de.odysseus.calyxo.base.util.ParseUtils.java
private static Object nullValue(Class type) { if (type.isPrimitive()) { if (type == boolean.class) return Boolean.FALSE; if (type == byte.class) return new Byte((byte) 0); if (type == char.class) return new Character((char) 0); if (type == short.class) return new Short((short) 0); if (type == int.class) return new Integer(0); if (type == long.class) return new Long(0); if (type == float.class) return new Float(0); if (type == double.class) return new Double(0); }//from ww w .jav a 2s. c o m return null; }
From source file:com.jonak.service.UserServiceImp.java
@Override public Boolean checkUserLogin(UserBean userobj) { return Boolean.FALSE; }
From source file:com.amazonaws.hal.client.JsonUnmarshallerUtil.java
static Object getObjectForToken(JsonToken token, JsonUnmarshallerContext context) throws IOException { switch (token) { case VALUE_STRING: return context.getJsonParser().getText(); case VALUE_NUMBER_FLOAT: case VALUE_NUMBER_INT: return context.getJsonParser().getNumberValue(); case VALUE_FALSE: return Boolean.FALSE; case VALUE_TRUE: return Boolean.TRUE; case VALUE_NULL: return null; default:/*from ww w. j a v a 2 s .c om*/ throw new RuntimeException("We expected a VALUE token but got: " + token); } }
From source file:Main.java
/** * Parses the attribute's value. If the value is 0 or "false" then false is returned, if the value is 1 or "true" * then true is returned, if the value is anything else then null returned. * /*w w w .jav a2 s . co m*/ * @param attribute attribute whose value will be converted to a boolean * * @return boolean value of the attribute or null */ public static Boolean getAttributeValueAsBoolean(Attr attribute) { if (attribute == null) { return null; } String valueStr = attribute.getValue(); if (valueStr.equals("0") || valueStr.equals("false")) { return Boolean.FALSE; } else if (valueStr.equals("1") || valueStr.equals("true")) { return Boolean.TRUE; } else { return null; } }