From 8d90c64ed5303d5907a8eddc21a914957958ed37 Mon Sep 17 00:00:00 2001 From: Muthukumaran Navaneethakrishnan Date: Fri, 27 Sep 2024 17:09:14 +0530 Subject: [PATCH] Update ReadMe.md --- ReadMe.md | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 96be539..7e72e17 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -101,39 +101,3 @@ results = Try.lazy.from(this::downloadCacheData) ``` - -## Filter -Instead of Writing This - -``` - - if (age > 60) { - result = "Can Retire"; - } else if (age > 40) { - result = "Can Go World Tour"; - } else if (age > 32) { - result = "Can Go for Job"; - } else if (age > 18) { - result = "Can Go To College"; - } else { - result = "Can Play"; - } - -``` - -Write This - -``` - result = Filter.If(() -> age > 60) - .then("Can Retire") - .elseIf(() -> age > 40) - .then("Can Go World Tour") - .elseIf(() -> age > 32) - .then("Can Go for Job") - .elseIf(() -> age > 18) - .then("Can Go To College") - .elseThen("Can Play") - .get(); - -``` -