class - Should I refactor static nested classes in Java into separate classes? -
I have a legacy code that has static nested classes:
public square fu. Fu Field and Functions // ... Private Static Class S Group {Private Static Map & lt; Integer, s group & gt; IdMap = new hashmap & lt; Integer, S group & gt; (); Public SGroup (int id, string type) {// ...}}}
By reading SO (like) I believe it is equal to two separate classes :
public square fu {// fu field and function // ...}
and
public Class SGUPP {constant map Integer, s group & gt; IdMap = new hashmap & lt; Integer, S group & gt; (); Public SGPUP (Int id, string type) {// code}
If it is correct, is there any advantage to maintaining a static nested class structure or should I need a refactor? The statement is correct and usually appears as the following rule of thumb:
An exception occurs when you define a nested class to allow easy access to the status of hosted class, in which case you consider
< / Div>
Comments
Post a Comment