Performance side effect with static internal Util classes?
- by Fostah
For a util class that contains a bunch of static functionality that's related to the same component, but has different purposes, I like to use static internal classes to organize the functionality, like so:
class ComponentUtil {
static class Layout {
static int calculateX(/* ... */) {
// ...
}
static int calculateY(/* ... */) {
// ...
}
}
static class Process {
static int doThis(/* ... */) {
// ...
}
static int doThat(/* ... */) {
// ...
}
}
}
Is there any performance degradation using these internal classes vs. just having all the functionality in the Util class?