Git Product home page Git Product logo

past's Introduction

-v 0.0.2 添加web项目中常用的字符串转化 ’ “ < > 四个字符转换 以及中文转码解决方案

-v 0.0.1 --添加不需要通过if/else的代码形式来进行 代码流线型编程

DEMO

public class ConditionTest { @Test public void testSet(){ Condition.empty().when(false).set("1").orWhenEquals("1").toDo(p -> System.out.println("1")); Condition.of(1).whenEquals(1).toDo(p -> System.out.println("2")).elseDo(System.out::print); Condition.of(1).whenEquals(2).setResult(1).elseWhen(p -> p > 0) .setResult(2).handleResult(result -> System.out.println(result)); Condition.of("123").map(Integer::parseInt).whenEquals(123).setConditionValueAsResult().result(); Condition.of(5) .when(t -> t % 2 == 0).toDo(t -> System.out.println(t + " is Even number")) .elseDo(t -> System.out.println(t + " is Odd number")); }

@Test public void testMap(){ Condition.of("123").whenEquals("123").map(Integer::parseInt).setResult("a").andWhenEquals(123); } }

past's People

Contributors

daida459031925 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.