Package net.sf.gluent.doc.fluentpatterns.immutablebuilder.Person

Examples of net.sf.gluent.doc.fluentpatterns.immutablebuilder.Person.PersonBuilder.firstName()


    PersonBuilder somePersonWith = Person.with()
        .firstName("defaultFirstName").lastName("defaultLastName")
        .birthYear(1900);
    PersonBuilder someMeikalainenWith = somePersonWith
        .lastName("Meikäläinen");
    Person mattiMeikalainen = someMeikalainenWith.firstName("Matti")
        .birthYear(1973).end();
    Person kalleKustaa = somePersonWith.firstName("Kalle")
        .lastName("Kustaa").end();
    assertEquals("Matti Meikäläinen 1973", mattiMeikalainen.toString());
    // now kalleKustaa is protected from Matti's 1973:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.