Skip to content

deepakvijayan/builder-inheritance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

builder-inheritance

A java builder pattern with inheritance

AbstractEmployee hrEmployee = new HREmployee.Builder()
    			.id(200L)
    			.salutation("Mr.")
    			.firstName("HRFirstName")
    			.middleName("HRMiddleName")
    			.lastName("HRLastName")
    			.emailId("[email protected]")
    			.dateOfBirth(LocalDate.of(2001,Month.JANUARY, 1))
    			.hrEmployee(true)
    			.operatingCountry("USA")
    			.build();
    	    	
    
    	AbstractEmployee salesEmployee = new SalesEmployee.Builder()
    			.id(201L)
    			.salutation("Mr.")
    			.firstName("SalesFirstName")
    			.middleName("SalesMiddleName")
    			.lastName("SalesLastName")
    			.emailId("[email protected]")
    			.dateOfBirth(LocalDate.of(2000,Month.JANUARY, 1))
    			.salesEmployee(true)
    			.salesRegion("SouthIndia")
    			.build();
          

About

A java builder with inheritance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages