public static Boolean boxed(boolean v) { return Boolean.valueOf(v); }
public static Boolean boxed(boolean v) { return Boolean.valueOf(v); }
public Object getObject () { return Boolean.valueOf(value); } };
public Object getObject () { return Boolean.valueOf(value); } };
@Override public Boolean convert(ResponseBody value) throws IOException { return Boolean.valueOf(value.string()); } }
public boolean isDecrypt(Properties connectionProperties, Properties configFileProperties) { String decrypterId = connectionProperties.getProperty(CONFIG_DECRYPT); if (decrypterId == null || decrypterId.length() == 0) { if (configFileProperties != null) { decrypterId = configFileProperties.getProperty(CONFIG_DECRYPT); } } if (decrypterId == null || decrypterId.length() == 0) { decrypterId = System.getProperty(SYS_PROP_CONFIG_DECRYPT); } return Boolean.valueOf(decrypterId); }
/** * Append a boolean field value. * @param fieldName the name of the field, usually the member variable name * @param value the field value * @return this, to support call-chaining */ public ToStringCreator append(String fieldName, boolean value) { return append(fieldName, Boolean.valueOf(value)); }
@Override protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { super.doParse(element, parserContext, builder); builder.addPropertyValue("ignoreInvalidKeys", Boolean.valueOf(element.getAttribute("ignore-unresolvable"))); }
@Override public void setProperties(Properties properties) { super.setProperties(properties); this.addGWTInterface = Boolean.valueOf(properties.getProperty("addGWTInterface")).booleanValue(); this.suppressJavaInterface = Boolean.valueOf(properties.getProperty("suppressJavaInterface")).booleanValue(); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (Boolean.valueOf(parenthesized).hashCode()); result = prime * result + distionOption; result = prime * result + ((from == null) ? 0 : from.hashCode()); result = prime * result + ((groupBy == null) ? 0 : groupBy.hashCode()); result = prime * result + ((into == null) ? 0 : into.hashCode()); result = prime * result + ((selectList == null) ? 0 : selectList.hashCode()); result = prime * result + ((where == null) ? 0 : where.hashCode()); return result; }
public static boolean getBooleanConfigParameter(String name, boolean defaultValue) { String value = getStringConfigParameter(name,null); return (value==null)?defaultValue:Boolean.valueOf(value); }
/** * Gets this mutable as an instance of Boolean. * * @return a Boolean instance containing the value from this mutable, never null * @since 2.5 */ public Boolean toBoolean() { return Boolean.valueOf(booleanValue()); }
private boolean isForceUseTag(Invocation invocation) { return Boolean.valueOf(invocation.getAttachment(FORCE_USE_TAG, url.getParameter(FORCE_USE_TAG, "false"))); }
private boolean isForceUseTag(Invocation invocation) { return Boolean.valueOf(invocation.getAttachment(FORCE_USE_TAG, url.getParameter(FORCE_USE_TAG, "false"))); }
protected boolean resolveProxyTargetClass(BeanDefinition beanDefinition) { boolean proxyTargetClass = this.defaultProxyTargetClass; Object attributeValue = beanDefinition.getAttribute(PROXY_TARGET_CLASS_ATTRIBUTE); if (attributeValue instanceof Boolean) { proxyTargetClass = (Boolean) attributeValue; } else if (attributeValue instanceof String) { proxyTargetClass = Boolean.valueOf((String) attributeValue); } else if (attributeValue != null) { throw new BeanDefinitionStoreException("Invalid proxy target class attribute [" + PROXY_TARGET_CLASS_ATTRIBUTE + "] with value '" + attributeValue + "': needs to be of type Boolean or String"); } return proxyTargetClass; }
@Override public void initialize(ConfigurableApplicationContext context) { ConfigurableEnvironment environment = context.getEnvironment(); String enabled = environment.getProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED, "false"); if (!Boolean.valueOf(enabled)) { logger.debug("Apollo bootstrap config is not enabled for context {}, see property: ${{}}", context, PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED); return; } logger.debug("Apollo bootstrap config is enabled for context {}", context); initialize(environment); }
@SuppressWarnings("unchecked") @Override public <T> T getOption(ChannelOption<T> option) { if (option == SO_RCVBUF) { return (T) Integer.valueOf(getReceiveBufferSize()); } if (option == SO_REUSEADDR) { return (T) Boolean.valueOf(isReuseAddress()); } if (option == SO_BACKLOG) { return (T) Integer.valueOf(getBacklog()); } return super.getOption(option); }
@Bean public Bar bar() { return new Bar(Boolean.valueOf(env.getProperty("bar.enabled"))); }
@Override public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) { boolean proxyTargetClass = true; if (node instanceof Element) { Element ele = (Element) node; if (ele.hasAttribute(PROXY_TARGET_CLASS)) { proxyTargetClass = Boolean.valueOf(ele.getAttribute(PROXY_TARGET_CLASS)); } } // Register the original bean definition as it will be referenced by the scoped proxy // and is relevant for tooling (validation, navigation). BeanDefinitionHolder holder = ScopedProxyUtils.createScopedProxy(definition, parserContext.getRegistry(), proxyTargetClass); String targetBeanName = ScopedProxyUtils.getTargetBeanName(definition.getBeanName()); parserContext.getReaderContext().fireComponentRegistered( new BeanComponentDefinition(definition.getBeanDefinition(), targetBeanName)); return holder; }
public void testCompare() { for (boolean x : VALUES) { for (boolean y : VALUES) { // note: spec requires only that the sign is the same assertEquals(x + ", " + y, Boolean.valueOf(x).compareTo(y), Booleans.compare(x, y)); } } }