PredicateUtils.equalPredicate(childValue)); if (lineageIndex == -1) { out.print(childValue);
/** * @see org.opencastproject.serviceregistry.impl.jmx.ServicesStatisticsMXBean#getWarningServiceCount() */ @Override public int getWarningServiceCount() { return CollectionUtils.countMatches(services.values(), PredicateUtils.equalPredicate(ServiceState.WARNING)); }
/** * @see org.opencastproject.serviceregistry.impl.jmx.HostsStatisticsMXBean#getOfflineCount() */ @Override public int getOfflineCount() { return CollectionUtils.countMatches(hosts.values(), PredicateUtils.equalPredicate(OFFLINE)); }
/** * @see org.opencastproject.serviceregistry.impl.jmx.ServicesStatisticsMXBean#getNormalServiceCount() */ @Override public int getNormalServiceCount() { return CollectionUtils.countMatches(services.values(), PredicateUtils.equalPredicate(ServiceState.NORMAL)); }
/** * @see org.opencastproject.serviceregistry.impl.jmx.HostsStatisticsMXBean#getInMaintenanceCount() */ @Override public int getInMaintenanceCount() { return CollectionUtils.countMatches(hosts.values(), PredicateUtils.equalPredicate(MAINTENANCE)); }
/** * @see org.opencastproject.serviceregistry.impl.jmx.ServicesStatisticsMXBean#getErrorServiceCount() */ @Override public int getErrorServiceCount() { return CollectionUtils.countMatches(services.values(), PredicateUtils.equalPredicate(ServiceState.ERROR)); }
/** * @see org.opencastproject.serviceregistry.impl.jmx.HostsStatisticsMXBean#getOnlineCount() */ @Override public int getOnlineCount() { return CollectionUtils.countMatches(hosts.values(), PredicateUtils.equalPredicate(ONLINE)); }
@Test public void testFindUsingPredicate() { // setup final TestObject expected = TestObject.VALUE3; Predicate<TestObject> predicate = PredicateUtils.equalPredicate(expected); // execute TestObject actual = EnumUtils.find(TestObject.class, predicate, TestObject.VALUE2); // validate assertEquals(expected, actual); }