boolean shouldHaveSomeRest =
selectedOption == FeelingEnum.TIRED
|| selectedOption == FeelingEnum.SLEEPY
|| selectedOption == FeelingEnum.RESIGNED;boolean shouldCodeMore = Check.anyEqual(selectedOption,
FeelingEnum.NOT_TIRED,
FeelingEnum.NOT_SLEEPY,
FeelingEnum.ABLE_TO_DO_MORE_JIRA_TASKS
);boolean canPerformOperation = Check.allTrue(
userRepository.doesExist(userId),
authorizationService.hasPrivileges(userId),
operationType == SomeEnum.DEPOSIT
);boolean canPerformOperation = Check.noneFalse(
userRepository.doesExist(userId),
authorizationService.hasPrivileges(userId),
null // it's totaly safe (no joke)!! treats "null" as not "false"
);boolean hasPermission = Check.allFalse(
authorizationService.isBanned(userId),
paymentService.didExceedMonthlyLimit(userId)
);boolean hasPermission = Check.noneTrue(
authorizationService.isBanned(userId),
paymentService.didExceedMonthlyLimit(userId),
null
);boolean hasAccess = Check.anyTrue(
authorizationService.isAdministrator(userId),
authorizationService.isTester(userId)
);boolean shouldBlockAccess = Check.anyFalse(
authorizationService.isTester(userId),
authorizationService.hasPrivileges(userId)
);boolean haveWonEverywhere = Check.allEqual(username,
electionsService.getWinnerFrom("Śródmieście"),
electionsService.getWinnerFrom("Żoliborz")
);boolean didNotWinAnywhere = Check.allNotEqual(username,
electionsService.getWinnerFrom("Śródmieście"),
electionsService.getWinnerFrom("Żoliborz")
);boolean haveWonSomewhere = Check.anyEqual(username,
electionsService.getWinnerFrom("Śródmieście"),
electionsService.getWinnerFrom("Żoliborz")
);boolean haveFailedSomewhere = Check.anyNotEqual(username,
electionsService.getWinnerFrom("Śródmieście"),
electionsService.getWinnerFrom("Żoliborz")
);The project is tested with Java 8 but there's no usage of Java 8's specific API, so it should be compatible with Java 7 also.




