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:com.nextep.designer.util.IdentitySet.java
@Override public boolean add(E e) { if (!elts.containsKey(e)) { elts.put(e, Boolean.TRUE); return true; }// w w w . j a va 2s.c om return false; }
From source file:com.amazon.kinesis.streaming.agent.config.AgentOptions.java
public static AgentOptions parse(String[] args) { AgentOptions opts = new AgentOptions(); JCommander jc = new JCommander(opts); jc.setProgramName("aws-kinesis-agent"); try {/*w w w. j a v a 2s .c o m*/ jc.parse(args); } catch (ParameterException e) { System.err.println(e.getMessage()); jc.usage(); System.exit(1); } if (Boolean.TRUE.equals(opts.help)) { jc.usage(); System.exit(0); } return opts; }
From source file:psiprobe.controllers.apps.ListAppInitParamsController.java
@Override protected ModelAndView handleContext(String contextName, Context context, HttpServletRequest request, HttpServletResponse response) throws Exception { ModelAndView mv = new ModelAndView(getViewName(), "appInitParams", ApplicationUtils.getApplicationInitParams(context, getContainerWrapper())); if (SecurityUtils.hasAttributeValueRole(getServletContext(), request)) { mv.addObject("allowedToViewValues", Boolean.TRUE); }//from w w w. j a v a 2 s . c om return mv; }
From source file:ToolBarButton.java
private void initButton() { setRolloverEnabled(true);/*from ww w. j av a2s .com*/ setRequestFocusEnabled(false); setMargin(new Insets(1, 1, 1, 1)); putClientProperty("JToolBar.isRollover", Boolean.TRUE); }
From source file:net.testdriven.psiprobe.controllers.apps.ListAppInitParamsController.java
protected ModelAndView handleContext(String contextName, Context context, HttpServletRequest request, HttpServletResponse response) throws Exception { ModelAndView mv = new ModelAndView(getViewName(), "appInitParams", ApplicationUtils.getApplicationInitParams(context)); if (SecurityUtils.hasAttributeValueRole(getServletContext(), request)) { mv.addObject("allowedToViewValues", Boolean.TRUE); }//from w w w .ja v a 2 s . co m return mv; }
From source file:Main.java
/** * Converts a String to a Boolean./*from www.j a va2s. c om*/ * * <code>'true'</code>, <code>'on'</code> or <code>'yes'</code> * (case insensitive) will return <code>true</code>. * <code>'false'</code>, <code>'off'</code> or <code>'no'</code> * (case insensitive) will return <code>false</code>. * Otherwise, <code>null</code> is returned.</p> * * <pre> * BooleanUtils.toBooleanObject(null) = null * BooleanUtils.toBooleanObject("true") = Boolean.TRUE * BooleanUtils.toBooleanObject("false") = Boolean.FALSE * BooleanUtils.toBooleanObject("on") = Boolean.TRUE * BooleanUtils.toBooleanObject("ON") = Boolean.TRUE * BooleanUtils.toBooleanObject("off") = Boolean.FALSE * BooleanUtils.toBooleanObject("oFf") = Boolean.FALSE * BooleanUtils.toBooleanObject("blue") = null * </pre> * * @param str the String to check * @return the Boolean value of the string, * <code>null</code> if no match or <code>null</code> input */ public static Boolean toBooleanObject(String str) { if ("true".equalsIgnoreCase(str)) { return Boolean.TRUE; } else if ("false".equalsIgnoreCase(str)) { return Boolean.FALSE; } else if ("on".equalsIgnoreCase(str)) { return Boolean.TRUE; } else if ("off".equalsIgnoreCase(str)) { return Boolean.FALSE; } else if ("yes".equalsIgnoreCase(str)) { return Boolean.TRUE; } else if ("no".equalsIgnoreCase(str)) { return Boolean.FALSE; } // no match return null; }
From source file:com.instagram.test.InstagramSerDeTest.java
@Test public void Tests() { mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.TRUE); mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, Boolean.TRUE); mapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, Boolean.TRUE); InputStream is = InstagramSerDeTest.class.getResourceAsStream("/instagram_jsons.txt"); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); try {/* w w w. j a va 2 s . c o m*/ while (br.ready()) { String line = br.readLine(); LOGGER.debug(line); Instagram ser = mapper.readValue(line, Instagram.class); String des = mapper.writeValueAsString(ser); LOGGER.debug(des); } } catch (Exception e) { e.printStackTrace(); Assert.fail(); } }
From source file:com.nokia.tools.vct.cli.CommandLineUtils.java
public static void initOptions(Options options) { IExtensionRegistry registry = Platform.getExtensionRegistry(); IExtension[] extensions = registry.getExtensionPoint(EXTENSION_NAMESPACE).getExtensions(); for (IExtension extension : extensions) { for (IConfigurationElement element : extension.getConfigurationElements()) { if (ELEMENT_OPTION.equals(element.getName())) { Option option = makeOption(element); options.addOption(option); } else if (ELEMENT_OPTION_GROUP.equals(element.getName())) { OptionGroup optionGroup = new OptionGroup(); boolean required = Boolean.TRUE.equals(element.getAttribute(OPTION_GROUP_ATTR_REQUIRED)); optionGroup.setRequired(required); for (IConfigurationElement element2 : element.getChildren(ELEMENT_OPTION)) { Option option = makeOption(element2); optionGroup.addOption(option); }/*from w w w . j av a2 s . c o m*/ options.addOptionGroup(optionGroup); } } } }
From source file:sys.core.manager.UbigeoManager.java
public List<UbigeoDto> obtenerPaisesActivos() throws DAOException { Map<String, Object> filtros = new HashMap<String, Object>(); filtros.put("estado", Boolean.TRUE); filtros.put("tipo", ConstantesCore.Parametro.PARAMETRO_TIPO_UBIGEO_PAIS); Map<String, String> orden = new HashMap<String, String>(); orden.put("descripcion", "asc"); return springHibernateDao.obtenerDtosConFiltrosConOrden(UbigeoDto.class, filtros, orden); }
From source file:ch.ralscha.extdirectspring.bean.ExtDirectFormPostResultTest.java
@Test public void testExtDirectFormPostResult() { ExtDirectFormPostResult result = new ExtDirectFormPostResult(); assertThat(result.getResult()).hasSize(1).contains(MapEntry.entry("success", Boolean.TRUE)); }