If you have different sets of fields in different versions and want to create a class to proceed them all, you should take a look at Builder design pattern.
https://en.wikipedia.org/wiki/Builder_pattern#Java
More Related Contents:
- What is an efficient way to implement a singleton pattern in Java? [closed]
- What components are MVC in JSF MVC framework?
- Implementing Singleton with an Enum (in Java)
- What is the “Execute Around” idiom?
- MVC pattern on Android
- Abstract class vs Interface in Java
- Subclassing a Java Builder class
- Converting many ‘if else’ statements to a cleaner approach [duplicate]
- When should we use Observer and Observable?
- What’s Alternative to Singleton
- Marker Interfaces in Java?
- Why do we need immutable class?
- why business logic should be moved out of JSP?
- Singleton Design Pattern: Pitfalls [closed]
- Replacing if else statement with pattern
- Java – Learning MVC [closed]
- Favor composition over inheritance [duplicate]
- Using Command Design pattern
- How to implement a FSM – Finite State Machine in Java
- Parcelable and inheritance in Android
- should a db connection be a singleton?
- Advantages of Java’s enum over the old “Typesafe Enum” pattern?
- Creation of Objects: Constructors or Static Factory Methods
- Java Singleton Pattern
- Java collections covariance problem
- Why use a singleton instead of static methods?
- The builder pattern and a large number of mandatory parameters
- When would the garbage collector erase an instance of an object that uses Singleton pattern?
- What is the difference between a Singleton pattern and a static class in Java? [duplicate]
- How to improve the builder pattern?