File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt on Enumeration interface

 
lhari krishna
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all,
elements() of vector class returns Enumeration object,but where as this class is not implementing Enumeration interface.But i have seen the follwing statements in a ppt searched on net.
"An object that implements the Enumeration interface generates a series of elements, one at a time. "
How an object is providing implementation for methods in Enumeration Interface

Thank you,
hari krishna
 
Rob Spoor
Sheriff
Pie
Posts: 20380
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's using an inner class that implements Enumeration but is not available in the API.

This sort of thing happens all the time. Methods that return interfaces or abstract classes use some implementation of those interfaces or subclass of those abstract classes that can be instantiated, then return an instance of those classes.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic