List of usage examples for java.lang Boolean TRUE
Boolean TRUE
To view the source code for java.lang Boolean TRUE.
Click Source Link
From source file:ConcurrentSet.java
public boolean add(Q item) { boolean containsObj = map.containsKey(item); if (containsObj == false) { /* ConcurrentHashMap doesn't allow null keys or values so we simply * use the item added to the collection as the key and the Boolean * TRUE object as the value. */ map.put(item, Boolean.TRUE); }//from w ww . ja va2 s .c o m return !containsObj; }
From source file:com.healthcit.cacure.web.interceptor.ModelAccessibilityInterceptor.java
@Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { // see if a handler is of accessibility controlled type if (handler instanceof EditControllable && modelAndView != null) { EditControllable controller = (EditControllable) handler; if (controller.isModelEditable(modelAndView)) { modelAndView.getModelMap().addAttribute(Constants.IS_EDITABLE, Boolean.TRUE); }/*from w w w . j a v a 2 s . c o m*/ } }
From source file:io.fabric8.maven.docker.util.ImagePullCache.java
public void add(String image) { cache.put(image, Boolean.TRUE); }
From source file:Main.java
/** * Returns the object equivalent of the boolean primitive. * <p>//w ww . j a v a 2 s . co m * A similar method is provided by the Boolean class in JDK 1.4, but you can use this one * to remain compatible with earlier JDKs. * * @param b the boolean value. * * @return <code>Boolean.TRUE</code> or <code>Boolean.FALSE</code>. */ public static Boolean valueOf(final boolean b) { return (b ? Boolean.TRUE : Boolean.FALSE); }
From source file:com.uimirror.core.framework.rest.util.WebUtil.java
/** * <p>This will test if the provided string is a valid url or not</p> * Check Out <code> {@link WebUtil#getUrl(String)}</code> for the url checking rules * @param spec url which will be parsed//from w w w.ja v a 2 s .co m * @return <code>true</code> if the string is a valid url else <code>false</code> */ public static boolean isValidUrl(String spec) { try { getUrl(spec); return Boolean.TRUE; } catch (IllegalArgumentException e) { return Boolean.FALSE; } }
From source file:org.vaadin.spring.test.VaadinTestExecutionListener.java
private static boolean alreadySetUpVaadinScopes(TestContext testContext) { return Boolean.TRUE.equals(testContext.getAttribute(SET_UP_SCOPES_ATTRIBUTE)); }
From source file:org.kaloz.datafeed.processor.infrastructure.integration.DynamicRouterToFeedsExpression.java
@Override public <T> T evaluate(Exchange exchange, Class<T> type) { if (Boolean.TRUE.equals(exchange.getProperty(MESSAGE_SENT_TO_RECEPIENT, Boolean.class))) { return null; } else {/*from www. j a va2s .c o m*/ exchange.setProperty(MESSAGE_SENT_TO_RECEPIENT, Boolean.TRUE); return (T) providersQueue .get(exchange.getIn().getHeader(ProcessorRouteBuilder.PROVIDER, String.class).toLowerCase()); } }
From source file:com.moviejukebox.plugin.AllocinePluginTest.java
@BeforeClass public static void configure() { doConfiguration();// ww w . j a v a 2 s . co m loadApiProperties(); PropertiesUtil.setProperty("mjb.internet.plugin", "com.moviejukebox.plugin.AllocinePlugin"); PropertiesUtil.setProperty("mjb.internet.tv.plugin", "com.moviejukebox.plugin.AllocinePlugin"); PropertiesUtil.setProperty("mjb.includeEpisodePlots", Boolean.TRUE); PropertiesUtil.setProperty("mjb.includeVideoImages", Boolean.FALSE); PropertiesUtil.setProperty("fanart.tv.download", Boolean.FALSE); }
From source file:com.solidmaps.webapp.dao.LicenseEXDAO.java
public LicenseEXEntity findByCompanyExpirationDate(Integer idCompany, Calendar dateExpiration) { StringBuilder sb = new StringBuilder(); sb.append("from LicenseEXEntity e where e.company.idCompany =:idCompany "); sb.append("and e.isActive =:active "); sb.append("and e.dateExpiration >= :dateExpiration "); sb.append("order by dateExpiration desc "); Query query = super.getEm().createQuery(sb.toString()); query.setParameter("idCompany", idCompany); query.setParameter("dateExpiration", dateExpiration); query.setParameter("active", Boolean.TRUE); @SuppressWarnings("unchecked") List<LicenseEXEntity> list = query.getResultList(); if (list != null && !list.isEmpty()) { return list.get(0); }//from w w w .j a v a 2 s .c om // TODO Refatorar essa Gambi aqui. Jogar pra uma Service // Se no possui Licena vigente, verifica se a ltima est protocolada LicenseEXEntity lastProtocoled = this.findByLastProtocoled(idCompany); if (lastProtocoled != null && StringUtils.isNotBlank(lastProtocoled.getProtocolRenovation())) { return lastProtocoled; } return null; }
From source file:edu.scripps.fl.hibernate.BooleanListStringType.java
public List<Boolean> getListFromString(String list) { List<Boolean> ids = newList(list.length()); for (int ii = 0; ii < list.length(); ii++) { Boolean bool = null;//from ww w .j a v a 2s .c o m if ('0' == list.charAt(ii)) bool = Boolean.FALSE; else if ('1' == list.charAt(ii)) bool = Boolean.TRUE; else bool = null; ids.set(ii, bool); } return ids; }