Java Code Examples for org.apache.commons.lang.BooleanUtils#toBooleanObject()
The following examples show how to use
org.apache.commons.lang.BooleanUtils#toBooleanObject() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StepOption.java From pentaho-kettle with Apache License 2.0 | 5 votes |
public static void checkBoolean( List<CheckResultInterface> remarks, StepMeta stepMeta, VariableSpace space, String identifier, String value ) { if ( !StringUtil.isEmpty( space.environmentSubstitute( value ) ) && null == BooleanUtils .toBooleanObject( space.environmentSubstitute( value ) ) ) { remarks.add( new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString( PKG, "StepOption.CheckResult.NotABoolean", identifier ), stepMeta ) ); } }
Example 2
Source File: BoolSetting.java From Thermos with GNU General Public License v3.0 | 5 votes |
@Override public void setValue(String value) { this.value = BooleanUtils.toBooleanObject(value); this.value = this.value == null ? def : this.value; config.set(path, this.value); }
Example 3
Source File: NamespaceCatalogResource.java From streamline with Apache License 2.0 | 5 votes |
@GET @Path("/namespaces") @Timed public Response listNamespaces(@Context UriInfo uriInfo, @Context SecurityContext securityContext) { List<QueryParam> queryParams = new ArrayList<>(); MultivaluedMap<String, String> params = uriInfo.getQueryParameters(); Collection<Namespace> namespaces; Boolean detail = false; if (params.isEmpty()) { namespaces = environmentService.listNamespaces(); } else { MultivaluedMap<String, String> copiedParams = new MultivaluedHashMap<>(); copiedParams.putAll(params); List<String> detailOption = copiedParams.remove("detail"); if (detailOption != null && !detailOption.isEmpty()) { detail = BooleanUtils.toBooleanObject(detailOption.get(0)); } queryParams = WSUtils.buildQueryParameters(copiedParams); namespaces = environmentService.listNamespaces(queryParams); } if (namespaces != null) { boolean environmentUser = SecurityUtil.hasRole(authorizer, securityContext, Roles.ROLE_ENVIRONMENT_USER); if (environmentUser) { LOG.debug("Returning all environments since user has role: {}", Roles.ROLE_ENVIRONMENT_USER); } else { namespaces = SecurityUtil.filter(authorizer, securityContext, Namespace.NAMESPACE, namespaces, READ); } return buildNamespacesGetResponse(namespaces, detail); } throw EntityNotFoundException.byFilter(queryParams.toString()); }
Example 4
Source File: ClusterCatalogResource.java From streamline with Apache License 2.0 | 5 votes |
/** * List ALL clusters or the ones matching specific query params. */ @GET @Path("/clusters") @Timed public Response listClusters(@Context UriInfo uriInfo, @Context SecurityContext securityContext) { List<QueryParam> queryParams = new ArrayList<>(); MultivaluedMap<String, String> params = uriInfo.getQueryParameters(); Collection<Cluster> clusters; Boolean detail = false; if (params.isEmpty()) { clusters = environmentService.listClusters(); } else { MultivaluedMap<String, String> copiedParams = new MultivaluedHashMap<>(); copiedParams.putAll(params); List<String> detailOption = copiedParams.remove("detail"); if (detailOption != null && !detailOption.isEmpty()) { detail = BooleanUtils.toBooleanObject(detailOption.get(0)); } queryParams = WSUtils.buildQueryParameters(copiedParams); clusters = environmentService.listClusters(queryParams); } if (clusters != null) { boolean servicePoolUser = SecurityUtil.hasRole(authorizer, securityContext, Roles.ROLE_SERVICE_POOL_USER); if (servicePoolUser) { LOG.debug("Returning all service pools since user has role: {}", Roles.ROLE_SERVICE_POOL_USER); } else { clusters = SecurityUtil.filter(authorizer, securityContext, NAMESPACE, clusters, READ); } return buildClustersGetResponse(clusters, detail); } throw EntityNotFoundException.byFilter(queryParams.toString()); }
Example 5
Source File: TransformOption.java From hop with Apache License 2.0 | 5 votes |
public static void checkBoolean( List<ICheckResult> remarks, TransformMeta transformMeta, IVariables variables, String identifier, String value ) { if ( !StringUtil.isEmpty( variables.environmentSubstitute( value ) ) && null == BooleanUtils .toBooleanObject( variables.environmentSubstitute( value ) ) ) { remarks.add( new CheckResult( ICheckResult.TYPE_RESULT_ERROR, BaseMessages.getString( PKG, "TransformOption.CheckResult.NotABoolean", identifier ), transformMeta ) ); } }
Example 6
Source File: IaasGatewayLoadBalancerProcess.java From primecloud-controller with GNU General Public License v2.0 | 5 votes |
public void stop(Long loadBalancerNo) { LoadBalancer loadBalancer = loadBalancerDao.read(loadBalancerNo); if (log.isInfoEnabled()) { log.info(MessageUtils.getMessage("IPROCESS-200228", loadBalancerNo, loadBalancer.getLoadBalancerName())); } // DNSサーバからの削除 deleteDns(loadBalancerNo); //Zabbixからの削除 Boolean useZabbix = BooleanUtils.toBooleanObject(Config.getProperty("zabbix.useZabbix")); if (BooleanUtils.isTrue(useZabbix)) { zabbixLoadBalancerProcess.stopHost(loadBalancerNo); } //IaasGatewayWrapper作成 Farm farm = farmDao.read(loadBalancer.getFarmNo()); IaasGatewayWrapper gateway = iaasGatewayFactory.createIaasGateway(farm.getUserNo(), loadBalancer.getPlatformNo()); // ELBの停止 gateway.stopLoadBalancer(loadBalancer.getLoadBalancerNo()); if (log.isInfoEnabled()) { log.info(MessageUtils.getMessage("IPROCESS-200229", loadBalancerNo, loadBalancer.getLoadBalancerName())); } }
Example 7
Source File: IaasGatewayLoadBalancerProcess.java From primecloud-controller with GNU General Public License v2.0 | 5 votes |
public void start(Long loadBalancerNo) { LoadBalancer loadBalancer = loadBalancerDao.read(loadBalancerNo); if (log.isInfoEnabled()) { log.info(MessageUtils.getMessage("IPROCESS-200226", loadBalancerNo, loadBalancer.getLoadBalancerName())); } //IaasGatewayWrapper作成 Farm farm = farmDao.read(loadBalancer.getFarmNo()); IaasGatewayWrapper gateway = iaasGatewayFactory.createIaasGateway(farm.getUserNo(), loadBalancer.getPlatformNo()); // ELBの起動 gateway.startLoadBalancer(loadBalancer.getLoadBalancerNo()); //Zabbixへの登録 Boolean useZabbix = BooleanUtils.toBooleanObject(Config.getProperty("zabbix.useZabbix")); if (BooleanUtils.isTrue(useZabbix)) { zabbixLoadBalancerProcess.startHost(loadBalancerNo); } // DNSサーバへの追加 addDns(loadBalancer.getLoadBalancerNo()); if (log.isInfoEnabled()) { log.info(MessageUtils.getMessage("IPROCESS-200227", loadBalancerNo, loadBalancer.getLoadBalancerName())); } }
Example 8
Source File: InstanceServiceImpl.java From primecloud-controller with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public void enableZabbixMonitoring(Long instanceNo) { // 引数チェック if (instanceNo == null) { throw new AutoApplicationException("ECOMMON-000003", "instanceNo"); } // インスタンスの存在チェック Instance instance = instanceDao.read(instanceNo); if (instance == null) { // インスタンスが存在しない場合 throw new AutoApplicationException("ESERVICE-000403", instanceNo); } // ZABBIX_INSTANCEの存在チェック ZabbixInstance zabbixInstance = zabbixInstanceDao.read(instanceNo); if (zabbixInstance == null) { // インスタンスが存在しない場合 throw new AutoApplicationException("ESERVICE-000422", instanceNo); } // Zabbix使用フラグ(config.properties、zabbix.useZabbix)のチェック Boolean useZabbix = BooleanUtils.toBooleanObject(Config.getProperty("zabbix.useZabbix")); if (BooleanUtils.isNotTrue(useZabbix)) { // Zabbix使用フラグが「true」以外 throw new AutoApplicationException("ESERVICE-000423", instanceNo); } // サーバOSステータスのチェック InstanceStatus instanceStatus = getInstanceStatus(instance); if (instanceStatus != InstanceStatus.RUNNING) { // サーバOSステータスが「RUNNING」以外 throw new AutoApplicationException("ESERVICE-000424", instance.getInstanceName()); } // Zabbixステータスのチェック ZabbixInstanceStatus zabbixInstanceStatus = ZabbixInstanceStatus.fromStatus(zabbixInstance.getStatus()); if (zabbixInstanceStatus != ZabbixInstanceStatus.UN_MONITORING) { // Zabbixの監視ステータスが「UN_MONITORING」以外 throw new AutoApplicationException("ESERVICE-000425", instance.getInstanceName()); } // Zabbix有効化 zabbixHostProcess.startHost(instanceNo); }
Example 9
Source File: RuleTemplateXmlParser.java From rice with Educational Community License v2.0 | 4 votes |
/** * Updates the rule template defaults options with those in the defaults element * @param defaultsElement the ruleDefaults element * @param updatedRuleTemplate the Rule Template being updated */ protected void updateRuleTemplateOptions(Element defaultsElement, RuleTemplateBo updatedRuleTemplate, boolean isDelegation) throws XmlException { // the possible defaults options // NOTE: the current implementation will remove any existing RuleTemplateOption records for any values which are null, i.e. not set in the incoming XML. // to pro-actively set default values for omitted options, simply set those values here, and records will be added if not present String defaultActionRequested = null; Boolean supportsComplete = null; Boolean supportsApprove = null; Boolean supportsAcknowledge = null; Boolean supportsFYI = null; // remove any RuleTemplateOptions the template may have but that we know we aren't going to update/reset // (not sure if this case even exists...does anything else set rule template options?) updatedRuleTemplate.removeNonDefaultOptions(); // read in new settings if (defaultsElement != null) { defaultActionRequested = defaultsElement.getChildText(DEFAULT_ACTION_REQUESTED, RULE_TEMPLATE_NAMESPACE); supportsComplete = BooleanUtils.toBooleanObject(defaultsElement.getChildText(SUPPORTS_COMPLETE, RULE_TEMPLATE_NAMESPACE)); supportsApprove = BooleanUtils.toBooleanObject(defaultsElement.getChildText(SUPPORTS_APPROVE, RULE_TEMPLATE_NAMESPACE)); supportsAcknowledge = BooleanUtils.toBooleanObject(defaultsElement.getChildText(SUPPORTS_ACKNOWLEDGE, RULE_TEMPLATE_NAMESPACE)); supportsFYI = BooleanUtils.toBooleanObject(defaultsElement.getChildText(SUPPORTS_FYI, RULE_TEMPLATE_NAMESPACE)); } if (!isDelegation) { // if this is not a delegation template, store the template options that govern rule action constraints // in the RuleTemplateOptions of the template // we have two options for this behavior: // 1) conditionally parse above, and then unconditionally set/unset the properties; this will have the effect of REMOVING // any of these previously specified rule template options (and is arguably the right thing to do) // 2) unconditionally parse above, and then conditionally set/unset the properties; this will have the effect of PRESERVING // the existing rule template options on this template if it is a delegation template (which of course will be overwritten // by this very same code if they subsequently upload without the delegation flag) // This is a minor point, but the second implementation is chosen as it preserved the current behavior updateOrDeleteRuleTemplateOption(updatedRuleTemplate, KewApiConstants.ACTION_REQUEST_DEFAULT_CD, defaultActionRequested); updateOrDeleteRuleTemplateOption(updatedRuleTemplate, KewApiConstants.ACTION_REQUEST_APPROVE_REQ, supportsApprove); updateOrDeleteRuleTemplateOption(updatedRuleTemplate, KewApiConstants.ACTION_REQUEST_ACKNOWLEDGE_REQ, supportsAcknowledge); updateOrDeleteRuleTemplateOption(updatedRuleTemplate, KewApiConstants.ACTION_REQUEST_FYI_REQ, supportsFYI); updateOrDeleteRuleTemplateOption(updatedRuleTemplate, KewApiConstants.ACTION_REQUEST_COMPLETE_REQ, supportsComplete); } }
Example 10
Source File: ZabbixHostProcess.java From primecloud-controller with GNU General Public License v2.0 | 4 votes |
public void stopHost(Long instanceNo) { ZabbixInstance zabbixInstance = zabbixInstanceDao.read(instanceNo); if (zabbixInstance == null) { // Zabbix監視対象でない throw new AutoException("EPROCESS-000401", instanceNo); } if (StringUtils.isEmpty(zabbixInstance.getHostid())) { // 監視登録されていない場合はスキップ return; } Instance instance = instanceDao.read(instanceNo); // ログ出力 if (log.isInfoEnabled()) { log.info(MessageUtils.getMessage("IPROCESS-100303", instanceNo, instance.getInstanceName())); } ZabbixProcessClient zabbixProcessClient = zabbixProcessClientFactory.createZabbixProcessClient(); // 監視対象の無効化 try { //ホスト名取得 String hostname = getHostName(instance.getFqdn()); //IP/DNS使用フラグ取得 Boolean useIp = BooleanUtils.toBooleanObject(Config.getProperty("zabbix.useIp")); //ZabbixプロキシID取得 String proxyHostid = getProxyHostid(zabbixProcessClient); zabbixProcessClient.updateHost(zabbixInstance.getHostid(), hostname, instance.getFqdn(), null, false, useIp, null, proxyHostid); // イベントログ出力 processLogger.debug(null, instance, "ZabbixStop", new Object[] { instance.getFqdn(), zabbixInstance.getHostid() }); // データベースの更新 zabbixInstance.setStatus(ZabbixInstanceStatus.UN_MONITORING.toString()); zabbixInstanceDao.update(zabbixInstance); } catch (AutoException ignore) { // 処理に失敗した場合、警告ログを出力する log.warn(ignore.getMessage()); } // ログ出力 if (log.isInfoEnabled()) { log.info(MessageUtils.getMessage("IPROCESS-100304", instanceNo, instance.getInstanceName())); } }
Example 11
Source File: ZabbixHostProcess.java From primecloud-controller with GNU General Public License v2.0 | 4 votes |
public void startHost(Long instanceNo) { ZabbixInstance zabbixInstance = zabbixInstanceDao.read(instanceNo); if (zabbixInstance == null) { // Zabbix監視対象でない throw new AutoException("EPROCESS-000401", instanceNo); } Instance instance = instanceDao.read(instanceNo); Platform platform = platformDao.read(instance.getPlatformNo()); // ログ出力 if (log.isInfoEnabled()) { log.info(MessageUtils.getMessage("IPROCESS-100301", instanceNo, instance.getInstanceName())); } ZabbixProcessClient zabbixProcessClient = zabbixProcessClientFactory.createZabbixProcessClient(); String hostid = zabbixInstance.getHostid(); //ホスト名取得 String hostname = getHostName(instance.getFqdn()); //IP/DNS使用フラグ取得 Boolean useIp = BooleanUtils.toBooleanObject(Config.getProperty("zabbix.useIp")); //ZabbixプロキシID取得 String proxyHostid = getProxyHostid(zabbixProcessClient); //IP設定 String zabbixListenIp = getZabbixListenIp(zabbixProcessClient, instance, platform); if (StringUtils.isEmpty(hostid)) { List<Hostgroup> hostgroups = getInitHostgroups(zabbixProcessClient, instance); // 監視対象の登録 hostid = zabbixProcessClient.createHost(hostname, instance.getFqdn(), hostgroups, true, useIp, zabbixListenIp, proxyHostid); // イベントログ出力 processLogger.debug(null, instance, "ZabbixRegist", new Object[] { instance.getFqdn(), hostid }); // データベースの更新 zabbixInstance.setHostid(hostid); zabbixInstance.setStatus(ZabbixInstanceStatus.MONITORING.toString()); zabbixInstanceDao.update(zabbixInstance); } else { // 監視対象の更新 zabbixProcessClient.updateHost(hostid, hostname, instance.getFqdn(), null, true, useIp, zabbixListenIp, proxyHostid); // データベースの更新 zabbixInstance.setStatus(ZabbixInstanceStatus.MONITORING.toString()); zabbixInstanceDao.update(zabbixInstance); // イベントログ出力 processLogger.debug(null, instance, "ZabbixStart", new Object[] { instance.getFqdn(), hostid }); } // 標準テンプレートの適用 Image image = imageDao.read(instance.getImageNo()); String templateNames = image.getZabbixTemplate(); if (StringUtils.isEmpty(templateNames)) { // TODO: 互換性のためプロパティファイルから取得する方法を残している templateNames = Config.getProperty("zabbix.basetemplate"); } if (StringUtils.isNotEmpty(templateNames)) { for (String templateName : templateNames.split(",")) { Template template = zabbixProcessClient.getTemplateByName(templateName); boolean ret = zabbixProcessClient.addTemplate(hostid, template); if (ret) { // イベントログ出力 processLogger.debug(null, instance, "ZabbixTemplateAdd", new Object[] { instance.getFqdn(), templateName }); } } } // ログ出力 if (log.isInfoEnabled()) { log.info(MessageUtils.getMessage("IPROCESS-100302", instanceNo, instance.getInstanceName())); } }
Example 12
Source File: InstanceServiceImpl.java From primecloud-controller with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public void disableZabbixMonitoring(Long instanceNo) { // 引数チェック if (instanceNo == null) { throw new AutoApplicationException("ECOMMON-000003", "instanceNo"); } // インスタンスの存在チェック Instance instance = instanceDao.read(instanceNo); if (instance == null) { // インスタンスが存在しない場合 throw new AutoApplicationException("ESERVICE-000403", instanceNo); } // ZABBIX_INSTANCEの存在チェック ZabbixInstance zabbixInstance = zabbixInstanceDao.read(instanceNo); if (zabbixInstance == null) { // インスタンスが存在しない場合 throw new AutoApplicationException("ESERVICE-000422", instanceNo); } // Zabbix使用フラグ(config.properties、zabbix.useZabbix)のチェック Boolean useZabbix = BooleanUtils.toBooleanObject(Config.getProperty("zabbix.useZabbix")); if (BooleanUtils.isNotTrue(useZabbix)) { // Zabbix使用フラグが「true」以外 throw new AutoApplicationException("ESERVICE-000423", instanceNo); } // サーバOSステータスのチェック InstanceStatus instanceStatus = getInstanceStatus(instance); if (instanceStatus != InstanceStatus.RUNNING) { // サーバOSステータスが「RUNNING」以外 throw new AutoApplicationException("ESERVICE-000426", instance.getInstanceName()); } // Zabbixステータスのチェック ZabbixInstanceStatus zabbixInstanceStatus = ZabbixInstanceStatus.fromStatus(zabbixInstance.getStatus()); if (zabbixInstanceStatus != ZabbixInstanceStatus.MONITORING) { // Zabbixの監視ステータスが「MONITORING」以外 throw new AutoApplicationException("ESERVICE-000427", instance.getInstanceName()); } // Zabbix無効化 zabbixHostProcess.stopHost(instanceNo); }
Example 13
Source File: InstanceServiceImpl.java From primecloud-controller with GNU General Public License v2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public Long createVcloudInstance(Long farmNo, String instanceName, Long platformNo, String comment, Long imageNo, String instanceType) { // インスタンスの作成 Long instanceNo = createInstance(farmNo, instanceName, platformNo, comment, imageNo); // プラットフォームのチェック Platform platform = platformDao.read(platformNo); if (!PCCConstant.PLATFORM_TYPE_VCLOUD.equals(platform.getPlatformType())) { throw new AutoApplicationException("ESERVICE-000428", instanceName); } PlatformVcloud platformVcloud = platformVcloudDao.read(platformNo); // VCloudインスタンスの作成 VcloudInstance vcloudInstance = new VcloudInstance(); vcloudInstance.setInstanceNo(instanceNo); //VM名 //サーバ起動後に名称を設定するので、ここではNULLを設定 //(VCloud上にインスタンスが作成されているかどうか判定する為) vcloudInstance.setVmName(null); //キーペア //キーペアはユーザ名のキーペアをデフォルトとして設定 Farm farm = farmDao.read(farmNo); List<VcloudKeyPair> vcloudKeyPairs = vcloudKeyPairDao.readByUserNoAndPlatformNo(farm.getUserNo(), platformNo); Long keyPairNo = vcloudKeyPairs.get(0).getKeyNo(); vcloudInstance.setKeyPairNo(keyPairNo); //ストレージタイプ List<PlatformVcloudStorageType> storageTypes = platformVcloudStorageTypeDao.readByPlatformNo(platformNo); Collections.sort(storageTypes, Comparators.COMPARATOR_PLATFORM_VCLOUD_STORAGE_TYPE); vcloudInstance.setStorageTypeNo(storageTypes.get(0).getStorageTypeNo()); //インスタンスタイプ if (StringUtils.isEmpty(instanceType)) { ImageVcloud imageVcloud = imageVcloudDao.read(imageNo); String[] instanceTypes = imageVcloud.getInstanceTypes().split(","); instanceType = instanceTypes[0]; } vcloudInstance.setInstanceType(instanceType); //VCLOUD_INSTANCE作成 vcloudInstanceDao.create(vcloudInstance); //ネットワーク //プライマリは必ずしもPCCネットワークでは無いが、 //IaasGateWay処理で一律、PCCネットワークを先頭に設定する為、 //VCLOUD_INSTANCE_NETWORKもPCCネットワークを先頭に設定する。 Boolean showPublicIp = BooleanUtils.toBooleanObject(Config.getProperty("ui.showPublicIp")); List<NetworkDto> networkDtos = iaasDescribeService.getNetworks(farm.getUserNo(), platformNo); for (int i = 0; i < networkDtos.size(); i++) { NetworkDto networkDto = networkDtos.get(i); //PCCネットワークと デフォルトネットワークを初期設定とする //インデックスはサーバ起動時にIaasGateWay側で設定されるのでNULLを設定 //IPアドレスはサーバ編集時またはサーバ起動時にIaasGateWay側で設定されるのでNULLを設定 //PCCネットワークとデフォルトネットワークの設定値が同じ場合は1件だけ追加する if (networkDto.isPcc() || (!networkDto.isPcc() && StringUtils.equals(networkDto.getNetworkName(), platformVcloud.getDefNetwork()))) { VcloudInstanceNetwork vcloudInstanceNetwork = new VcloudInstanceNetwork(); vcloudInstanceNetwork.setPlatformNo(platformNo); vcloudInstanceNetwork.setInstanceNo(instanceNo); vcloudInstanceNetwork.setFarmNo(farm.getFarmNo()); vcloudInstanceNetwork.setNetworkName(networkDto.getNetworkName()); vcloudInstanceNetwork.setNetworkIndex(null); vcloudInstanceNetwork.setIpMode("POOL"); vcloudInstanceNetwork.setIpAddress(null); //config.propertiesの「showPublicIp」= true → PCCネットワークがプライマリ //config.propertiesの「showPublicIp」= false → デフォルトネットワーク(業務ネットワーク)がプライマリ if (networkDto.isPcc()) { vcloudInstanceNetwork.setIsPrimary(BooleanUtils.isTrue(showPublicIp)); } else if (StringUtils.equals(networkDto.getNetworkName(), platformVcloud.getDefNetwork())) { vcloudInstanceNetwork.setIsPrimary(BooleanUtils.isNotTrue(showPublicIp)); } //VCLOUD_INSTANCE_NETWORK作成 vcloudInstanceNetworkDao.create(vcloudInstanceNetwork); } } // イベントログ出力 eventLogger.log(EventLogLevel.INFO, farmNo, farm.getFarmName(), null, null, instanceNo, instanceName, "InstanceCreate", instanceType, platformNo, new Object[] { platform.getPlatformName() }); // フック処理の実行 processHook.execute("post-create-instance", farm.getUserNo(), farm.getFarmNo(), instanceNo); return instanceNo; }
Example 14
Source File: MutableBoolean.java From astor with GNU General Public License v2.0 | 2 votes |
/** * Gets the value as a Boolean instance. * * @return the value as a Boolean */ public Object getValue() { return BooleanUtils.toBooleanObject(this.value); }
Example 15
Source File: MutableBoolean.java From lams with GNU General Public License v2.0 | 2 votes |
/** * 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 BooleanUtils.toBooleanObject(this.value); }
Example 16
Source File: BooleanWrapper.java From spacewalk with GNU General Public License v2.0 | 2 votes |
/** * Sets the boolean value to true if the aBool is 1, false if aBool is 0. * @param aBool the value to be used */ public void setBool(Integer aBool) { bool = BooleanUtils.toBooleanObject(aBool); }
Example 17
Source File: MutableBoolean.java From lams with GNU General Public License v2.0 | 2 votes |
/** * Gets the value as a Boolean instance. * * @return the value as a Boolean, never null */ public Object getValue() { return BooleanUtils.toBooleanObject(this.value); }