Regarding implementations of interfaces

In Collection framework API, all the interfaces have been provided with adapter classes, which provide most of the skeletal implementation for those interfaces. The classes which are extended from these adapter classes are again implementing all the super interfaces. Why? For what reason, the ArrayList, HashSet etc., are implementing the interfaces List, Collection & Set, Collection respectively.

Perhaps the list of interfaces isn't stored in plain text, but for a small class that extends ArrayList I see this:.......1........
<init>...()V...C
ode...LineNumber
Table...main...(
[Ljava/lang/Stri
ng;)V...SourceFi
le...deleteme.ja
va........java/u
til/Vector...del
eteme$1CustomCla
ss...CustomClass
...InnerClasses.
............My n
ame is Gary...de
leteme...java/ut
il/ArrayList...(
Ldeleteme;)V...a
dd...(Ljava/lang
/Object;)Z.!....
..............D.
..........Y...M.
..Y*...N,-...W..
.............II don't see all the interfaces listed in the class file itself. Maybe I don't know what I'm talking about, but I'm sure I don't know what you're talking about. Perhaps your decompiler is looking up the inheritence tree.
I effect, the real class ArrayList DOES implement interface List. I don't understand the problem.

Similar Messages

  • How to implement XI interfaces in online and offline modes?

    Hi Everybody,
    Can you please tell me how to implement XI interfaces in online and offline modes?
    thanks a lot,
    Ramya Shenoy.

    Hi,
    Are you looking for Push and Pull mechanism of PI?
    When the adapters like SOAP, HTTP, IDOC, etc. send the data to PI , it is nothing but a push mechanism, and hence the communication is synchronous by default.
    But adapters like JDBC, File, etc. they fetch the data from Source Applications, so it is a kind of Pull mechanism for PI, and
    by default communication is asynchrnous.
    Pls elaborate exactly what are you looking for?
    Regards,
    Supriya.

  • Actual implementation of interfaces involved in JDBC connection creation

    Pl some body tell me where does the actual implementation of interfaces like connection,Statement,PreparedStatement..we use to to make a JDBC connection from a simple application or J2EE application.
    Thanks

    Hi sharma,
    JDBC API will be implemented by JDBC Driver vendors. For example Microsoft provide "com.microsoft.jdbc.sqlserver.SQLServerDriver" driver for SQL Server 2000. Similarly Oracle privide several JDBC Drivers to be used with Oracle databases.
    Sun has provided a JDBC-ODBC bridge (Driver) along with its JDK or JSDK. This driver is capable for connecting Java applications with any ODBC connection.
    Cuz this driver is included with the JDK/JSDK therefore you can use it to connect with for example MS Access DB or any other ODBC connected DB.
    If you want to connect your Java or J2EE application to some specific database then you should get the Driver for that particular database.
    regards,
    Humayun

  • How to find out in program which all classes have implemented an interface

    Hello,
    I have created an interface and few classes are implementing the interface.
    I want to know in a program which all class have implemented the interface.
    Is it possible to find it out and how?
    Regards,
    Bikash.

    Hi Bikash,
    Read the Database view VSEOIMPLEM with where condition REFCLSNAME = Interface Name and version = 1.
    This would give you all the classes which have implemented the interface and are active...
    If you want to look at the values that the field version can have then see Type Group SEOC ans search for version....
    Hope this help...
    Regards,
    Sitakant

  • How to get classes which implement the interface in program

    Hi,
    I created an interface and some classes are implementing it. I want to know in which classes the interface is implemented through program. I mean in which table the interface implemented details stores.
    please helps regarding this.
    Thanks,
    Regards,
    Priya

    Hi.,
    Read the  database view VSEOIMPLEM with where condition.,  REFCLSNAME =  <Interface Name> and Version = 1.
    This gives the class names which implement the interface.,
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Dummy Implementation of Interface

    Hi SAP Gurus & Mr Uwe,
    I'm interested with your discussion (Mr Uwe's commented) a while ago regarding dummy implementation of interface on Mar 25, 2008 12:52 PM.
    I saw this CL_EX_CRM_BUS20001_R3A class of mine has the same code as the topic that you commented.
    I would like to know about this dummy implementation of interface. Firstly is what is the use of this interface? I assume that this program is the main BADI so it should have all the parameters required for the next program which is in this case is the interface. Is that right?
    Thank you very much for your insightful explanation.
    With kind regards,
    Michael

    Hi Adrian,
    Did you have any success with your Trading Partner Directory?
    Our project includes ECC, CRM 5.1, SRM6.0 and Portal. We have this CRM scenario where a customer (manager) logs on and approves one of his employees, already self-registered, as a customer Portal user. UME seems to support that scenario, but it can only retrieve company information from a SRM backend system using a custom implementation of the Trading Partner Directory interface. In our case it is a CRM scenario and CRM Business Partners are not replicated on SRM.
    What is that SRM Trading Partner Directory interface and how much effort is involved in this custom implementation?
    Does the portal need to restart for new Companies to be added?
    Is there a better way to update the list of companies in UME from a list of CRM Business Partner?
    Thanks

  • Concrete classes implement abstract class and implements the interface

    I have one query..
    In java collection framework, concrete classes extend the abstract classes and implement the interface. What is the reason behind extending the class and implementing the interface when the abstract class actually claims to implement that interface?
    For example :
    Class Vector extends AbstractList and implements List ,....
    But the abstract class AbstractList implements List.. So the class Vector need not explicitly implement interface List.
    So, what is the reason behind this explicit definition...?
    If anybody knows please let me know..
    Thanx
    Rajendra.

    Why do you post this question again? You already asked this once in another thread and it has been extensively debated in that thread: http://forum.java.sun.com/thread.jsp?forum=31&thread=347682

  • Class constructor that implements an interface returns an  "interface", why

    Hi,
    I am studying some code that I need to understand well. This code works, I just don't understand the following:
    A class was defined extending an interface as so:
    public class GeometricShape implements Area {
    // constructor
    public GeometricShape() {
    System.out.println('bla);
    In another file, GeometricShape class was instantiated as follows:
    public class ExampleUse {
    Area g = new GeometricShape();
    My qustion is, why does the code above expects "new GeometricShape()" constructor to return an interface of type Area?
    Can someone explain?
    thanks

    Can someone explain?When a class implements an interface, or extends another class, or when a interface extends another interface, it means that anywhere an instance of the parent class or interface is expected, the child can be used.
    Wherever a Mammal is expected, you can provide a Dog or Cat or Whale or Human or NakedMoleRat. Each of those is a mammal.
    If you say "give me some food," and you don't specify anything else, the person you're talking to can hand you a hamburger or an apple or a bowl of rice. Any of those will meet the requirements you put forth.
    This is how the OO "is-a" relationship maps to Java.

  • Reg Implementing the interfaces in JDBC

    Hi,
    When we do a program that deals with database connectivity,we are not implementing the Interfaces like Statement,ResultSet.But we are using those
    interfaces inside our program.
    Can anybody justify how it is possible.
    Thanks in advance

    The DB vendors are responsible for providing implementation classes for these interfaces. That's why we need to keep DB specific jar files in CLASSPATH when we do DB activities..
    Gautam

  • I am facing problem regarding graphical user interface. I am using text box for editing files. I want to show the line numbers and graphical breakpoint​s along with text box. Can anybody help me in this? Thanks.

    I am facing problem regarding graphical user interface. I am using text box for editing files. I want to show the line numbers and graphical breakpoints along with text box. Can anybody help me in this? Thanks.

    Thanks for you reply.
    But actually I don't want to show the \ (backslashes) to the user in my text box. 
    Ok let me elaborate this problem little more. 
    I want to show my text box as it is in normal editors e.g. In Matlab editor. There is a text box and on left side the gray bar shows the line numbers corresponding to the text. Further more i want that the user should be able to click on any line number to mark specific line as breakpoint (red circle or any graphical indication for mark). 
    Regards,
    Waqas Ahmad

  • Implementing SingleThradModel interface and synchronizing service

    Hi all,
    I came across the one question.
    What is difference between the implementing SingleThradModel interface and synchronizing service method in the Servlet?
    Which one is the better one? and why?
    It seems to be same for me... but still confused?
    Please explain me.
    Thanks,
    Rahul

    No one is better. Just write threadsafe code. E.g. do not declare instance variables which are to be used per request. Just keep in mind that only one instance of the Servlet will be created which lives as long as the webapplication runs and that it will be reused among all requests. Keep request scoped variables inside the method block and you're safe.

  • Implementing Runnable interface  Vs  extending Thread class

    hi,
    i've come to know by some people says that Implementing Runnbale interface while creating a thread is better option rather than extending a Thread class. HOw and Why? Can anybody explain.?

    Its the same amount of programming work...
    Sometimes it is not possible to extend Thread, becuase your threaded class might have to extend something else.
    The only difference between implementing Runnable and extending Thread is that by extending Thread, each of your threads has a unique object associated with it, whereas with Runnable, many threads share the same object instance.
    http://developerlife.com/lessons/threadsintro/default.htm#Implementing

  • Implementing Basecommand interface

    hi all,
    i have created a GUI using swing which i want to evoke as a button in ARC map ,but for that i have to implement basecommand interface and use my code there , but iam not getting it how to do that so can any one give me a code snippet or a description soas to how that can be achieved...
    thanks in advance

    Sorry, but there is no BaseCommand interface in the API.
    And what don't you know? What a baseCommand is supposed to do? Neither do I, but if it exists somewhere, it's likely to have a documentation that tells you. Or don't you kno who wto implement interfaces? Then read the tutorial.

  • Implementing comboboxmodel interface

    If i was to implement this interface there is this method definition:
    public Object getSelectedItem() {
    How am i supposed to implement this method? How do i get the selected item.
    I dont want an alternative answer to this as it isnt a problem as such, im just curious as to how it is accomplished.
    Thanks
    Dave

    You need to create a ResultSet Manager, just like you did with the Connection interface.
    Your problem here is the getConnection() method of the ResultSet interface returns an object that implements the original Connection interface, not one that applies to your purpose. Then, of course, you'll be able to use the original close() method.
    When you create the ResulSet manager, overwrite the close() pattern, according to your programming pattern.
    Cesar Villalta A.
    [email protected]

  • Must implement specifik interface

    Hi,
    Im creating a game to force myshelf to code a game-engine, just for fun. In this game I have superclass for a basic unit. This class gets subclassed down to game-units. I have different type of game units, some more advanced than others (my game idea is like a manager game where choose between units similar to warcraft 3 units).
    To help the game-engine separate between the different type of units and the methods that can be used on them, I want to use differtent interface for the advanced units. This could be the start of the Wizard-class:
    public class Wizards extends BasicUnit implements SpellCaster {
    // method and variables that are specific for a wizard and dont excist in BasicUnit
    }Question is: How can I force a method in the game-enginge class to look if a used unit implements a certain interface, in this case the SpellCaster-interface?
    I know it should be possible, like the Comparable Interface. But how do i do it?
    If its a dumb question a link to the specifik documents would do, I read it myshelf. But of course I would be happy if someone have the kindness to write an example. Again, this aint homework, just a fun x-mas project for me.

    Ani_Skywalker wrote:
    Hi again Jverd,
    I google [visitor pattern|http://en.wikipedia.org/wiki/Visitor_pattern] and through that I also find [virtual function|http://en.wikipedia.org/wiki/Virtual_functions] . I can see how its usefull in this issue.
    Thought my main concern for the moment is about [composition over inheritance|http://blogs.msdn.com/steverowe/archive/2008/04/28/prefer-composition-over-inheritance.aspxI]. This is not what we learned in school when I took my first and second java courses. But I think the composition over inheritance strategy seems very sensible.
    jverd wrote:
    I don't really know your whole picture, but one option is to define a type that has those particular operations in common, and pass that type around when that's what you need. The subclasses could inherit from a base class that provides those, or implement an interface, and then add their own methods.But this is exactly what my class BasicUnit does. Maybe my english is bad and I misslead you, or maybe I should pick a better name for that class, like Unit. But what it does is to hold methods that every unit in the game use. Subclasses that need more methods adds that. The way you wrote your example is kind of how I've done it, as it seems to me. Could you tell me were you think I do wrong?It may have just been a misunderstanding on my part, as I don't know you and I don't know your requirements or the details of how you're implementing them.
    Or it may be that you're kind of close to doing it correctly, but not quite. The situation I described as a good approach can look a lot like the not-so-good way I thought you were doing it. I'm kind of sleep-deprived right now, so I don't have the energy or brainpower to go into any more detail at the moment.
    Good luck though. I expect somebody will continue helping you if you keep working at it.

Maybe you are looking for

  • Is there a way to bring back the actual tab "bar"?

    So in switching from FF3.6 to 5.0 I have noticed that the actual "bar" that holds the tabs is gone. Observe: [http://i.imgur.com/eU7lo.jpg http://i.imgur.com/eU7lo.jpg] It's visually slightly annoying to not have a distinct separator between the tab

  • Where is the best place to buy a replacement screen for late 2007 Macbook (3.1)?

    All, My screen needs to be replaced on my late 2007 Macbook.  I am willing to do the work myself, but need help in finding the correct model screen to buy.  Where would be the best place to buy?

  • HT4528 Icloud videos and pictures?

    I have synced both my  iphone 5s and iPad to the icloud though I see my calender ,,notes etc, I can't find my pictures or videos What am I doing wrong?

  • Compression with zero elimination (reverse postings)

    I executed a compression with zero elimination in a custom InfoCube in order to avoid entries that only contain zero values as key figures (for example reverse posting) are contained in the InfoCube after compressing. However, not all the entries whe

  • DVD Menu with Two or More Highlights per Button

    I have created a DVD Main Menu in Photoshop CS4 Extended for Premiere Elements 4 as well as editing an existing Premiere Elements 4 DVD Main Menu in Photoshop Elements 6 and run into the same following highlighting problem: The design of each menu bu