Added method declarations returnin generic return type in IQueue interface to make it work in java8.
Merge pull request #4092 from mdogan/java8-fix

Added method declarations returning generic return type in IQueue interfa...