Added missing final and @NotNull annotations were needed, and completed the javadoc.