Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
55 views

I'm using a template method for tests with an abstract base class. The abstract class is just a template with code that will be used in each derived class, and when some part of the code differs, I ...
0 votes
2 answers
86 views

I am trying to write a class template with a variadic template parameter pack which is separated into two groups of arguments. Those shall be used in member templates. template <class... Args> ...
0 votes
2 answers
445 views

I write the code in Java and I have a case where I need to get the status of an order depending on the product type. Each product type has the same base logic as written below. protected String ...
0 votes
0 answers
136 views

I am trying to use TemplateMethod pattern for creating ServiceBaseClass which will be called from RESTAPI I am trying to create a wrapper API to call another API, another API will have around 50 ...
1 vote
0 answers
75 views

I have to implement a solution where the code behaves differently according to different conditions. I created some pseudocode to show it: public void generalMethod() { firstMethod(); ...
0 votes
1 answer
314 views

In my Spring Boot app, I am trying to implement Template Method and in my concrete class, I am trying to use generic as shown below: template interface: Not sure if I need to use it? public interface ...
user avatar
0 votes
0 answers
164 views

In my Java (Spring Boot) app, I have the following pdf service that uses BrandService: Service: public interface PDFService<T, S> { String generatePdf(UUID uuid); } BrandServiceImpl: @...
user avatar
0 votes
0 answers
118 views

I have implemented the template method design pattern to handle the generation of different types of emails in this way: public abstract class TemplateBuilder { public buildEmail(Map<...
0 votes
1 answer
116 views

I have been using a Create Request as shown below and needed to implement an Update Request with some fields non-required. @Data public class CreateRequest extends BaseRequest { @NotEmpty ...
user avatar
1 vote
0 answers
69 views

I'm tring to use factory pattern (or factory method pattern) for image analysis. But memory and harddisk restriction keeps me to reduce any of dependencies as much as possible or make them as soft-...
1 vote
0 answers
242 views

I am writing template method pattern for Sorting (SelectionSort, InsertionSort and QuickSort). I wrote SelectionSort interface, following by its implementation (SelectionSortImpl) and then its unit ...
1 vote
1 answer
361 views

I have made this four classes and I'm wondering if I used the template method design pattern correctly because I'm really struggeling with this subject. I have used the methods getPrijsBehandeling() ...
0 votes
0 answers
128 views

I have an interface RequestProcessorInterface. There are different scenarios for processing a json request e.g. async vs synchronous request. I am trying to use template method pattern where the steps ...
1 vote
1 answer
158 views

Whether using methods created outside the abstract class will disturb the Template Method design pattern? Will it still be Template Method pattern if I create MyOwnMethod and call it inside a method? ...
0 votes
1 answer
168 views

While reading the source code of ReentrantLock, I found that internally it use a synchronizer which extends AbstractQueuedSynchronizer to control the lock. Doug Lea mentioned in this paper that ...

15 30 50 per page
1
2 3 4 5
...
9

AltStyle によって変換されたページ (->オリジナル) /