Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about builder-pattern

Read more about builder-pattern

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - builder-pattern

Builder pattern that requires at least two properties to be specified

I am writing a RequestBuilder class, which will handle the creation of a query string, based on the following criteria category (String) country (String) keywords (String[]) page (int) pageSize (int)...
test-img

Kotaka Danski

java

class

optional-parameters

builder-pattern

Votes: 0

Answers: 2

Latest Answer

As a designer, you need to decide what fields are really required. There is no such thing as "maybe required". To use Builder Pattern and enforce required parameters, mark the fields as fina...
test-img

hfontanez

Alternate implementation of Builder Pattern. Anything wrong with this?

Most of the implementations of Builder pattern I have seen are along these lines: https://github.com/Design-pattrns/Builder-Pattern/blob/master/src/Computer.java Basically the nested builder class nee...
test-img

Marco Polo

oop

design-patterns

builder

builder-pattern

Votes: 0

Answers: 1

Latest Answer

I would say the example above is "simpler" but it has none of the advantages a builder offers and its probably better to just use the new keywords where you need the object and adding the pr...
test-img

Ross G

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved