Removed invalid final modifier.
Removed redundant 'extends Object'.
Removed unnecessary semicolons.
Simplified if statements.
Invert method.