List of usage examples for org.apache.commons.lang3 BooleanUtils toInteger
public static int toInteger(final boolean bool, final int trueValue, final int falseValue)
Converts a boolean to an int specifying the conversion values.
BooleanUtils.toInteger(true, 1, 0) = 1 BooleanUtils.toInteger(false, 1, 0) = 0
From source file:org.jasig.cas.ticket.registry.EhCacheTicketRegistry.java
/** * {@inheritDoc}/* w w w. j a v a2 s . com*/ * @see Cache#getKeysWithExpiryCheck() */ @Override public int sessionCount() { return BooleanUtils.toInteger(this.supportRegistryState, this.ticketGrantingTicketsCache.getKeysWithExpiryCheck().size(), super.sessionCount()); }
From source file:org.jasig.cas.ticket.registry.EhCacheTicketRegistry.java
/** * {@inheritDoc}//from ww w . j ava 2s . com * @see Cache#getKeysWithExpiryCheck() */ @Override public int serviceTicketCount() { return BooleanUtils.toInteger(this.supportRegistryState, this.serviceTicketsCache.getKeysWithExpiryCheck().size(), super.serviceTicketCount()); }