Example usage for java.lang Boolean equals

List of usage examples for java.lang Boolean equals

Introduction

In this page you can find the example usage for java.lang Boolean equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.

Usage

From source file:org.hyperic.hq.galerts.strategies.NoneStrategy.java

public void triggerNotFired(Gtrigger trigger) {
    Boolean oldFired = (Boolean) _firedMap.get(trigger);

    if (oldFired.equals(Boolean.TRUE)) {
        _firedMap.put(trigger, Boolean.FALSE);
        _numFired--;/*w w w .j  av a2  s .c om*/
    }
    _log.debug(trigger + " unfired.  Numfired= " + _numFired);
}

From source file:org.hyperic.hq.galerts.strategies.NoneStrategy.java

public void triggerFired(Gtrigger trigger, FireReason reason) {
    Boolean oldFired = (Boolean) _firedMap.get(trigger);

    if (oldFired.equals(Boolean.FALSE)) {
        _firedMap.put(trigger, Boolean.TRUE);
        _numFired++;//from  w  ww . j av  a2  s . com
    }

    _log.debug(trigger + " fired.  Numfired= " + _numFired);
}

From source file:be.fedict.eid.idp.webapp.XSSProtectionFilter.java

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
        throws IOException, ServletException {
    Boolean xssProtection = this.configuration.getValue(ConfigProperty.XSS_PROTECTION, Boolean.class);
    if (null != xssProtection) {
        if (xssProtection.equals(Boolean.TRUE)) {
            HttpServletResponse httpServletResponse = (HttpServletResponse) response;
            httpServletResponse.setHeader("X-XSS-Protection", "1; mode=block");
        }//from  ww w .  jav  a  2s  . c  om
    }
    chain.doFilter(request, response);
}

From source file:org.jgrades.rest.admin.accounts.UserSpecificationsBuilder.java

public UserSpecificationsBuilder withActiveState(Boolean active) {
    if (active == null) {
        return this;
    } else if (active.equals(Boolean.TRUE)) {
        result = (result == null) ? Specifications.where(specs.onlyActive())
                : Specifications.where(result).and(specs.onlyActive());
    } else {/*ww  w.j  a v  a2s.c o m*/
        result = (result == null) ? Specifications.where(specs.onlyInactive())
                : Specifications.where(result).and(specs.onlyInactive());
    }
    return this;
}

From source file:com.vmware.identity.sts.ws.handlers.SoapMsgMetricsCollector.java

@Override
public boolean handleMessage(SOAPMessageContext context) {
    Validate.notNull(context);/*w w  w . jav  a 2  s . c o m*/

    Boolean outbound = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
    if (outbound != null && outbound.equals(Boolean.TRUE)) {

        reportTime(context, PerfMeasurementInterface.ISoapMsgHandlerOB);
        return true;
    }

    setMsgStartTs();
    return true;
}

From source file:org.kepler.gui.component.ShowFolders.java

/**
 * Set whether or not folders should be shown in the Component Tab.
 * //from  w w  w .  ja v  a2 s  .  com
 * @param showFolders
 *            true if the folders should show up in the component tab
 */
public void set(Boolean showFolders) {
    if (_showFolders != null && showFolders.equals(_showFolders)) {
        // do nothing
    } else {
        _showFolders = showFolders;
        serializeToDisk();
    }
}

From source file:org.intermine.web.logic.session.SessionMethods.java

/**
 * Return true if and only if the current user if the superuser.
 * @param session the session//w  w w . j av  a 2s  .  co  m
 * @return true for superuser
 */
public static boolean isSuperUser(HttpSession session) {
    Boolean superUserAttribute = (Boolean) session.getAttribute(Constants.IS_SUPERUSER);
    return superUserAttribute != null && superUserAttribute.equals(Boolean.TRUE);
}

From source file:es.pode.modificador.presentacion.ejecutadas.ModificacionesEjecutadasControllerImpl.java

public final void eliminarModificaciones(ActionMapping mapping,
        es.pode.modificador.presentacion.ejecutadas.EliminarModificacionesForm form, HttpServletRequest request,
        HttpServletResponse response) throws Exception {

    Long[] identificadores = form.getIdModificaciones();
    Boolean resultadoEliminacion = this.getSrvHerramientaModificacion().eliminarModificacion(identificadores);
    if (resultadoEliminacion.equals(Boolean.FALSE)) {
        saveErrorMessage(request, MENSAJE_ERROR_DETALLES);

    } else if (resultadoEliminacion.equals(Boolean.TRUE)) {
        saveSuccessMessage(request, MENSAJE_EXITO_DETALLE);
    }/*from   w  ww  .  j av  a 2s .c o m*/
}

From source file:org.kuali.rice.kns.util.BeanPropertyComparator.java

/**
 * Constructs a PropertyComparator for comparing beans using the properties named in the given List. Properties will be compared
 * in the order in which they are listed. Case will be ignored if ignoreCase is true.
 * /*from www .  java2 s  .c om*/
 * @param propertyNames List of property names (as Strings) used to compare beans
 * @param ignoreCase if true, case will be ignored during String comparisons
 */
public BeanPropertyComparator(List propertyNames, boolean ignoreCase) {
    if (propertyNames == null) {
        throw new IllegalArgumentException("invalid (null) propertyNames list");
    }
    if (propertyNames.size() == 0) {
        throw new IllegalArgumentException("invalid (empty) propertyNames list");
    }
    this.propertyNames = Collections.unmodifiableList(propertyNames);
    this.ignoreCase = ignoreCase;

    if (ignoreCase) {
        this.stringComparator = String.CASE_INSENSITIVE_ORDER;
    } else {
        this.stringComparator = ComparableComparator.getInstance();
    }
    this.booleanComparator = new Comparator() {
        public int compare(Object o1, Object o2) {
            int compared = 0;

            Boolean b1 = (Boolean) o1;
            Boolean b2 = (Boolean) o2;

            if (!b1.equals(b2)) {
                if (b1.equals(Boolean.FALSE)) {
                    compared = -1;
                } else {
                    compared = 1;
                }
            }

            return compared;
        }

    };
    this.genericComparator = ComparableComparator.getInstance();
}

From source file:be.fedict.eid.idp.model.applet.ChannelBindingServiceBean.java

@Override
public X509Certificate getServerCertificate() {
    Boolean omitSecureChannelBinding = this.configuration.getValue(ConfigProperty.OMIT_SECURE_CHANNEL_BINDING,
            Boolean.class);
    if (null != omitSecureChannelBinding) {
        if (omitSecureChannelBinding.equals(Boolean.TRUE)) {
            LOG.warn("omitting secure channel binding");
            return null;
        }// w w w .  j  av a 2  s .c  o m
    }
    X509Certificate serverCertificate = this.configuration.getAppletConfig().getServerCertificate();
    if (null == serverCertificate) {
        LOG.warn("secure channel binding not yet configured");
    }
    return serverCertificate;
}