OptionalInt vs Optional<Integer>
When scrolling through the documentation for the java.util package, I was surpised to find that Optional<T> and OptionalInt have no relationship to each other. This seems very hard to belive, as it suggests that they are unrelated classes. Why don't they have a common interface, class, are sub-types, or something to reveal the relationship they have? (They're very similar classes when you look at their uses.) Also, why the need for an additional OptionalInt class? Why can't you just use Optional<Integer> ? I thought it was due to the fact that int is primitive, but there is no OptionalChar so