Interface inheritance and Generics

Hello!
For an application I need several 'stores' (classes which contain some elements) which share certain characteristics. I would like to create a general StoreInterface, and some specialized interfaces which inherit from this, e.g. a 'KwicStoreInterface'.
Also I would like to specify that the Store takes elements of a general type 'Storable', but the KwicStore only takes objects of the type 'KwicInterface' which inherits from 'Storable'.
I thought that specifying these restrictions using Generics would be a good idea, but I can't get the hang of it.
This is a simplyfied version of what I tried:
// interfaces for the stores
public interface StoreInterface<T extends Storable>{
    public T getElem(Long id);
    public void setElem(T elem);
    public void setElems(Map<Long, T> elems);
public interface KwicStoreInterface<T extends KwicInterface> extends StoreInterface{
    public void SomeKwicStoreSpecificMethod();
// Interfaces for the elements
public interface Storable {
    public Long getID();
    public void setID(Long id);
public interface KwicInterface extends Storable{
    public void SomeKwicSpecificMethod();
}When I try to instantiate KwicStoreInterface, this code doesn't compile, because the methods are not recognized as valid implementations of the interface's methods.
public KwicStore<T extends KwicInterface> implements KwicStoreInterface {
     private Map<Long, T> elements = new HashMap<Long, T>();
   // Only his method seems to be recognized correctly:
    public T getElem(Long id){
          return elements.get(id);
   // not recognized as interface method
    public void setElem(T elem){
           elements.put(elem.getID(), elem);
    // not recognized as interface method
    public void setElems(Map<Long, T> elems){
            elements = elems;
   // this one seems okay, too, of course:
   public void SomeKwicStoreSpecificMethod() {}
}If I allow the Netbeans IDE to automatically instantiate the methods, all the type information is reverted to Storable or is lost completely (in case of the Map), resulting in methods like:
@Override
    public void setElem(Storable elem) {
        throw new UnsupportedOperationException("Not supported yet.");
    @Override
    public void setElems(Map elems) {
        throw new UnsupportedOperationException("Not supported yet.");
    @Override
    public Storable getElem(Long id) {
        throw new UnsupportedOperationException("Not supported yet.");
    }What am I doing wrong and how can I achieve the functionality I want?
Thanks in advance for any help!

Thanks, that was really helpful!
However, I ran into new problem now.
The KwicStore should be built using a Reader object (which parses an XML file) and the reader contains a Map with concrete types.
However, it seems impossible to initialize a 'variable parameter' with a concrete type.
public class KwicStore<T extends KwicInterface> implements KwicStoreInterface<T>{
    Map<Long, T> elements;
    // doesn't work:
    KwicStore() {
        KwicStoreReader reader = new KwicStoreReader();
        reader.read();
        this.elements = reader.readerElems;
   // other methods
// the very simplified reader
public class KwicStoreReader {
     public Map<Long, KwicInterface> readerElems = new HashMap<Long, KwicInterface>();
    // do something to fill readerElems with Kwic objects (Kwic instantiates KwicInterface)
    public void read() {
         KwicInterface kwic = new Kwic();
         readerElems.put(kwic.getID(), kwic);
}Is there any way around this?
I already tried to use Generics and variables within the reader, too, but then I couldn't put Kwic objects into the readerElems map.
public class KwicStoreReader<T extends KwicInterface> {
     public Map<Long, T> readerElems = new HashMap<Long, T>();
    // do something to fill elems with Kwic objects (Kwic instantiates KwicInterface)
    public void read() {
         T kwic = new Kwic(); // this doesn't work
         readerElems.put(kwic.getID(), kwic);
}Actually, I would also be fine with restricting KwicStoreInterface to take KwicInterface objects only (without the extends), but I don't know how to declare that correctly.

Similar Messages

  • Interfaces, factories and Generics

    I'm used to a declaration/implementation programming style
    where the declaration suggests a default implementation,
    a so called object factory.
    Unfortunatelly I do not know how to extend this style to Generics.
    Please look at the example below.
    The declaration and the implementation are fine to -Xlint:unchecked.
    But: regardless how I use it, it will not compile without warnings.
    Any idea how to change the code in order to keep the style?
    Example:
    the declaration:
    ================
    package de.toolsprofi.example.factory;
    public interface Thing<T> {
    public T get(); public void set( T t );
    public class Factory {
    public static Thing newInstance() {
    return new de.toolsprofi.example.factory.impl.Thing();}}}
    the implementation:
    ===================
    package de.toolsprofi.example.factory.impl;
    public class Thing<T> implements de.toolsprofi.example.factory.Thing<T> {
    public Thing() {this.t=null;}
    private T t;
    public T get() {return t;} public void set( T t ) { this.t = t; }}
    the usage:
    ==========
    package de.toolsprofi.example.factory.use;
    import de.toolsprofi.example.factory.Thing;
    public class Use {
    public void use1() {
    Thing<String> thing = Thing.Factory.newInstance();
    thing.set( "bar" );}
    public void use2() {
    Thing thing = Thing.Factory.newInstance();
    ((Thing<String>)thing).set( "foo" );}
    public void use3() {
    Thing<String> thing = (Thing<String>)(Thing.Factory.newInstance());
    thing.set( "bar" );}}

    Thank you, Yay. I havn't thought about using abstract classes. So I'm not sure if I understand your suggestion right. I will experiment with that incitation. Jet it seems to me that I just have to drop the static in the declaration and change the rule for factory usage in order to gain a default implemention:
    //===declaration package
    package declare;
    public interface Thing<T> {
        public T get(); public void set( T t );
        public class Factory<T> {
            public Thing<T> newInstance() {
                return new de.toolsprofi.example.factory.impl.Thing<T>();
    //===default implementation package
    package declare.impl;
    public class Thing<T> implements declare.Thing<T> {
        public Thing() {this.t=null;}
        private T t;
        public T get() {return t;} public void set( T t ) { this.t = t; }
    //=== some usage package
    package use;
    import declare.Thing;
    public class Use {
        public void use() {
            Thing<String> thing = new Thing.Factory<String>().newInstance();
            thing.set( "hi" );
    }

  • Parameterized inheritance and implementation

    I'm learning generics, and I'm having a problem getting the following to work
    I have a base class with some data/behavior
    public abstract Base<E> {
    //...Then there is a concrete class that extends Base and implements Map
    public Concrete<E extends Object & Map<K,V>> extends Base<E extends Object & Map<K,V>> implements Map<K, V>{
    //...I cannot seem to specify that the type for Base must be a Map<K, V>.
    I've thought about containing and delegating, but really Concrete IS-A Base and Concrete IS-A Map.
    Am I missing something about inheritance and generics?
    Any suggestions?

    James,
    Based on your previous posts I think you understand generics as well as I do, and in some aspects, probably better.
    I was trying to capture my thought processes (and that is quite hard since mostly this happens sub-consciously - its quite hard to drag it up into consciousness then document it, but the effort was worthwhile for me and hopefully for others as well).
    In this particular case, E is Map<K,V>, but there could be all sorts of relationships between the type variables, the idea is to identify these and back substitute them, slowly getting rid of type variables until you can't get rid of any more. The ones you are left with are the ones that need to be type parameters.
    take the other post from yesterday
    http://forum.java.sun.com/thread.jsp?thread=554360&forum=316&message=2719355
    as another worked example...
    from
    "And I'm trying to create a special generic container (List) which would only take elements that
    implement the Keyable interface above. For example:
    public class ListOfKeyables <E extends Keyable> extends AbstractList<E>{..."
    and
    "Now, besides standard List methods that use type varable 'E' in their definitions, I would also
    like to have a special method like this:
       public E getByKey(Object key)   {   ... "
    I would start with (ignoring their "E extends Keyable" suggestion, its too premature for that).
    public class ListOfKeyables < ???? > extends AbstractList<E> {
        public E getByKey(Object key) { ... }
    } but "only take elements that
    implement the Keyable interface" suggests replacing E with Keyable<K> thus
    public class ListOfKeyables < ???? > extends AbstractList<Keyable<K>> {
        public Keyable<K> getByKey(Object key) { ... }
    Note In this case the substitution getting rid of E introduced another type variable (K), thats OK, its still a step toward a solution.
    Then the original poster said "But I would like to constrain the 'key' argument in this method to be of type that is specified as a type parameter to the Keyable interface"
    So after implementing this requirement we have
    public class ListOfKeyables < ???? > extends AbstractList<Keyable<K>> {
        public Keyable<K> getByKey(K key) { ... }
    }At this point there is no more substitutions or requirements to fulfill.
    So we look through and see what type variables are still unresolved. These (in this case there is only one K), are then the type parameters of the class, and thus we have what I suggested in that post
    public class ListOfKeyables <K> extends AbstractList<Keyable<K>> {
        public Keyable<K> getByKey(K key) { ... }
    }As a final step, we need to look at the type parameters and decide if they need any constraints (K extends something), These might come from some use of the type parameter ( such as if Keyable constrained its K parameter, we would need to do the same), or from the application requirements. But in this case, there are not any.
    At a certain level of abstraction, this process is not a whole lot different to the process you use when working out what parameters a method or constructor needs (and that process also tends to happen below the consciusness threshold).
    In really simplistic terms, the answer to both "what parameters do I need" questions is "all the ones you can't get from somewhere else or derive from the ones you already have".
    Bruce

  • SWIG - C++/Java and multiple interface inheritance - SWIG typemaps

    In C++ I have the following. Can someone explain how to use SWIG typemaps to accomplish multiple interface inheritance in Java? I understand there is a javainterfaces typemap built into SWIG however I am such a newb with SWIG I really don't know where to start.
    class IRemoteSyncIO
    public:
      virtual ~IRemoteSyncIO () {}
    protected:
      IRemoteSyncIO () {}
    private:
      IRemoteSyncIO (const IRemoteSyncIO&);
      IRemoteSyncIO& operator= (const IRemoteSyncIO&);
    class IRemoteAsyncIO
    public:
      virtual ~IRemoteAsyncIO () {}
    protected:
      IRemoteAsyncIO () {}
    private:
      IRemoteAsyncIO (const IRemoteAsyncIO&);
      IRemoteAsyncIO& operator= (const IRemoteAsyncIO&);
    class RemoteMpe : public IRemoteSyncIO, public IRemoteAsyncIO
    }Thanks!

    Actually now I understand what you mean.... Ok, now I am going to modify the problem slightly and add Interface2 into the picture. The new code is:
    interface Interface1<SelfType extends Interface1<SelfType>>
    interface Interface2
    class Superclass implements Interface1<Superclass>
    class Dependant<Type extends Interface1<Type>>
       public static <Type extends Interface1<Type> & Interface2> Dependant<Type> getInstance(Class<Type> c)
         return new Dependant<Type>();
    class Subclass extends Superclass implements Interface2
      public Subclass()
        Dependant<Subclass> dependant = Dependant.getInstance(Subclass.class);
    }Now, previously I could replace:
    Dependant<Subclass> dependant = Dependant.getInstance(Subclass.class);
    with
    Dependant<Superclass> dependant = Dependant.getInstance(Superclass.class);
    and it solved the problem, but now that Type must implement Interface2 I cannot.
    The reason I added this requirement is that this is actually what is going on in my applicationI had made mistakely omited this detail from the original use-case.
    Can you think up of a possible solution to this new use-case?
    Thanks,
    Gili

  • Inheritance and Interface invocation Query

    interface IProduct{
         void getProductName();            
    abstract class Option implements Product{
                 void exercisePrice();
                 void premiumPaid();
    class Option1 extends Option{
               // Implement all abstract methods defined in Option and IProduct.
    class Option2 extends Option{
         // Implement all abstract methods defined in Option and IProduct.
    class Trade{
               public Trade(IProduct p){
         p.getProductName()   // I can only get this method behaviour.
                    // My Query
                    // I also need to invoke the methods exercisePrice() and premiumPaid() defined in Option1 and Option2
                    // If I use instanceof,the code will get cluttered and ugly.
                                     if p instanceof Option1
                                     Option1 op1 = ((Option1) p);
                                     op1.exercisePrice();
                                      if p instanceof Option2
                                      if p instanceof OptionN
    class TestHarness{
             public static void main(String args[]){
             // Create an option
             Option1 option1 = new Option1();
             // Trade in the product
             Trade trade = new Trade(option1);
             Query:
             The Trade constructor defines IProduct.
             IProduct can be a concrete Bond,Option,CDS,IRS etc.
             How do I get the methods defined in subclasses Option1 and Option2 or for any concrete subclass of IProduct?
             Is there a way of dynamically invoking the methods of the object created?
            Or do I need to change the design.
    }

    It looks to me like you're violating the Liskov Substitution Principle.
    "The LSP says that the users of base classes should not have to do anything special in order to use derivatives."
    - R. MartinThis also violates the Open/Closed principle, because whenever you add a new Option concrete class, you're going to have to update your Trade class (it's not "closed to modification" when the environment around it changes).
    The "fix" is just that its not a good idea to force the polymorphism by using instanceof. You should either:
    1. Get rid of the IProduct interface completely and treat each product type separately.
    2. Reconsider your base class (in this case, IProduct) to see if it really can contain additional behavior applicable to all products.
    The previous post about the visitor pattern is interesting, but I don't see how it applies to this example (perhaps some more light could be shed there by the poster).

  • Inheritance and access control - "private protected"

    I'm reopening an old topic, seems to have been last discussed here 2-3 years ago.
    It concerns the concept of restricting access to class members to itself, and its subclasses. This is what "protected" does in C++ and "private protected" did in early versions of the Java language. This feature was removed from Java with a motivation along the lines of not being "simple", and "linear" (in line with the other access modes, each being a true subset of the next). Unfortunately, the article which explained Sun's position on this keyword combination seems to have been removed from the site, so I haven't been able to read its original text.
    But regardless of simplicity of implementation or explaining Java's access modifiers to newbies, I believe it is a fundamental part of OO programming for such an access mode to exist. The arguments for having the standard "private" mode in fact also apply for having a C++-style "protected" mode. (Arguing that classes within a package are related and it therefore doesn't hurt to also give them access to Java's "protected" members, is equally arguing that "private" is unneccessary, which noone of course believes.)
    The whole concept of inheritance and polymorphism and encapsulation builds on the access modes private, protected, and public (in the C++ senses). In Java the "package" concept was added - a nice feature! But I see no justification for it to negate the proper encapsulation of a class and its specializations.

    What effect upon inheritance other than hiding members
    from subclasses is there?
    None. And I cant think of another declaration that prevents members from being inherited but private.
    Of course the onus comes on the programmer with Java's
    definition of "protected" - but
    1) there is rarely a single programmer working within
    a package
    The point was the package is a unit which does not hide from itself. Just like all methods within a class can see each other, all classes within a package can, and all packages within a program can.
    2) it muddies the encapsulation in the design - when
    you see a "protected" method someone else, or yourself
    some time ago - wrote, how do you know if the design
    intention is to have it accessed solely by the class
    and its subclasses, or if it is indeed intended to be
    shared with the whole package? The only way to do
    this today is to always explicitly specify this in the
    comments, which may be lacking, inconsistent, and
    abused (since it isn't enforced).Encapsulation would be implementation hiding. Not method hiding. The only thing you should probably allow out of your package is an interface and a factory anyway.
    I understand where you are coming from, but I really have not had occasion to take issue with it. I can't think of a real codeing situation where this is required. OTOH, I can't think of a coding situation where I need to access a protected method from another class either.

  • A question about inheritance and overwriting

    Hello,
    My question is a bit complicated, so let's first explain the situation with a little pseudo code:
    class A {...}
    class B extends A{...}
    class C extends B {...}
    class D extends C {...}
    class E extends B {...}
    class F {
      ArrayList objects; // contains only objects of classes A to E
      void updateObjects() {
        for(int i = 0; i < objects.size(); i++)
          A object = (A) objects.get(i); // A as superclass
         update(A);
      void update(A object) { ... }
      void update(B object) { ... }
      void update(D object) { ... }
    }My question now:
    For all objects in the objects list the update(? object) method is called. Is it now called with parameter class A each time because the object was casted to A before, or is Java looking for the best fitting routine depending on the objects real class?
    Regards,
    Kai

    Why extends is evil
    Improve your code by replacing concrete base classes with interfaces
    Summary
    Most good designers avoid implementation inheritance (the extends relationship) like the plague. As much as 80 percent of your code should be written entirely in terms of interfaces, not concrete base classes. The Gang of Four Design Patterns book, in fact, is largely about how to replace implementation inheritance with interface inheritance. This article describes why designers have such odd beliefs. (2,300 words; August 1, 2003)
    By Allen Holub
    http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html
    Reveal the magic behind subtype polymorphism
    Behold polymorphism from a type-oriented point of view
    http://www.javaworld.com/javaworld/jw-04-2001/jw-0413-polymorph_p.html
    Summary
    Java developers all too often associate the term polymorphism with an object's ability to magically execute correct method behavior at appropriate points in a program. That behavior is usually associated with overriding inherited class method implementations. However, a careful examination of polymorphism demystifies the magic and reveals that polymorphic behavior is best understood in terms of type, rather than as dependent on overriding implementation inheritance. That understanding allows developers to fully take advantage of polymorphism. (3,600 words) By Wm. Paul Rogers
    multiple inheritance and interfaces
    http://www.javaworld.com/javaqa/2002-07/02-qa-0719-multinheritance.html
    http://java.sun.com/docs/books/tutorial/java/interpack/interfaceDef.html
    http://www.artima.com/intv/abcs.html
    http://www.artima.com/designtechniques/interfaces.html
    http://www.javaworld.com/javaqa/2001-03/02-qa-0323-diamond_p.html
    http://csis.pace.edu/~bergin/patterns/multipleinheritance.html
    http://www.cs.rice.edu/~cork/teachjava/2002/notes/current/node48.html
    http://www.cyberdyne-object-sys.com/oofaq2/DynInh.htm
    http://www.gotw.ca/gotw/037.htm
    http://www.javajunkies.org/index.pl?lastnode_id=2826&node_id=2842
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=1&t=001588
    http://pbl.cc.gatech.edu/cs170/75
    Downcasting and run-time
    http://www.codeguru.com/java/tij/tij0083.shtml
    type identification
    Since you lose the specific type information via an upcast (moving up the inheritance hierarchy), it makes sense that to retrieve the type information ? that is, to move back down the inheritance hierarchy ? you use a downcast. However, you know an upcast is always safe; the base class cannot have a bigger interface than the derived class, therefore every message you send through the base class interface is guaranteed to be accepted. But with a downcast, you don?t really know that a shape (for example) is actually a circle. It could instead be a triangle or square or some other type.
    To solve this problem there must be some way to guarantee that a downcast is correct, so you won?t accidentally cast to the wrong type and then send a message that the object can?t accept. This would be quite unsafe.
    In some languages (like C++) you must perform a special operation in order to get a type-safe downcast, but in Java every cast is checked! So even though it looks like you?re just performing an ordinary parenthesized cast, at run time this cast is checked to ensure that it is in fact the type you think it is. If it isn?t, you get a ClassCastException. This act of checking types at run time is called run-time type identification (RTTI). The following example demonstrates the behavior of RTTI:
    //: RTTI.java
    // Downcasting & Run-Time Type
    // Identification (RTTI)
    import java.util.*;
    class Useful {
    public void f() {}
    public void g() {}
    class MoreUseful extends Useful {
    public void f() {}
    public void g() {}
    public void u() {}
    public void v() {}
    public void w() {}
    public class RTTI {
    public static void main(String[] args) {
    Useful[] x = {
    new Useful(),
    new MoreUseful()
    x[0].f();
    x[1].g();
    // Compile-time: method not found in Useful:
    //! x[1].u();
    ((MoreUseful)x[1]).u(); // Downcast/RTTI
    ((MoreUseful)x[0]).u(); // Exception thrown
    } ///:~
    As in the diagram, MoreUseful extends the interface of Useful. But since it?s inherited, it can also be upcast to a Useful. You can see this happening in the initialization of the array x in main( ). Since both objects in the array are of class Useful, you can send the f( ) and g( ) methods to both, and if you try to call u( ) (which exists only in MoreUseful) you?ll get a compile-time error message.
    If you want to access the extended interface of a MoreUseful object, you can try to downcast. If it?s the correct type, it will be successful. Otherwise, you?ll get a ClassCastException. You don?t need to write any special code for this exception, since it indicates a programmer error that could happen anywhere in a program.
    There?s more to RTTI than a simple cast. For example, there?s a way to see what type you?re dealing with before you try to downcast it. All of Chapter 11 is devoted to the study of different aspects of Java run-time type identification.
    One common principle used to determine when inheritence is being applied correctly is the Liskov Substitution Principle (LSP). This states that an instance of a subclass should be substitutible for an instance of the base class in all circumstances. If not, then it is generally inappropriate to use inheritence - or at least not without properly re-distributing responsibilities across your classes.
    Another common mistake with inheritence are definitions like Employee and Customer as subclasses of People (or whatever). In these cases, it is generally better to employ the Party-Roll pattern where a Person and an Organization or types of Party and a party can be associated with other entities via separate Role classes of which Employee and Customer are two examples.

  • How does interface inheritance work ??

    I have the following code. The printout is
    Main
    w
    x
    w
    I don't understand how this is working. Clearly interface inheritance is working differently than normal class inheritance. Please explain.
    thanks in advance.
    kris.
    The code follows
    interface C
         char w = DD.echo ('w');
         char x = DD.echo ('x');
    interface D extends C
         char y = DD.echo('y');
         char z = DD.echo('z');
         char a = DD.echo(w);
    class DD implements D
         static char echo(char c)
              System.out.print(c + "\n");
              return c;
         public static void main (String args[])
              System.out.println("Main");
              DD dd = new DD();
              System.out.println(w + "\n");
    }

    The interface only needs loaded if one of its members
    is accessed (although this is probably implemented
    differently on different JVMs).No.
    The interface is loaded.
    It is not initialized. There is a difference. See section 12 of the JLS.
    Assuming the above is true, it appears the following
    is happening
    1. C is loaded because w is accessed from DD�s main .
    This loading causes �w� to be echoed and then �x� to
    be echoed since loading the interface initializes the
    members which in turn call the echo method (I am
    assuming that this only happends when the members are
    not �constants�).
    2. The main method then echoes the w variable (which
    is �w�).
    Having said this, I would think this code would behave
    differently on different JVMs so I am not sure how it
    could even be a �good� theoretical question (unless
    this is documented in the JLS).It is in the JLS.
    Also, loading the the interface may not really be what
    is happening; the initialization code may be in-lined
    in the class (this could be tested by printing w twice
    in main � really strange behaviour).No. It can't inline the initilization of one class in another class.

  • Regarding Inheritance (and super)

    Let:
    class A { ... }
    class B extend A { ... }
    From within class B, the super keyword allows me to access the visible methods and variables in A. However, super does not seem to be a reference; that is, while I can legally do
    Object a = this;
    I cannot do
    Object a = super;
    But, I would really like to be able to do this. That is, from the context of B, I would like to obtain a reference to the supertype, such that (ref instanceof A == true), (ref instanceof B == false). In short, I want a 'super' that behaves exactly like a 'this'. The ultimate goal of this is to pass a reference to the supertype into a method (say, a static method). Is this at all possible in Java? My only idea at the moment is to create a new instance of the superclass and set all of its state correctly, pass this instance into the desired method, then reestablish state once the method returns. Sounds painful and error-prone, though.
    Thanks for any ideas.

    sancho_panza wrote:
    ejp wrote:
    Why? Any method will already accept a reference to B as a reference to A, if B extends A.I am performing a transformation on Java classes that involves turning instance methods into static methods. It is not problem to pass a reference to 'this' into such a static method. But what if the instance method invokes super? Super cannot be invoked statically; thus I would like to pass 'super' into this method, which is impossible. I suppose creating a temporary container for the superclass is the easiest way (though it seems like this should be a lot easier).To do this you need to transform the Java static inheritance to a dynamic equivalent. This is quite straightforward. Say you have,
    class A {}
    class B extends A {}Now the A class is split into an interface A and an implementation class A_IMPL. You get this,
    interface A {}
    class A_IMPL implements A {}
    class B implements A {
       private A a_ref = new A_IMPL(); // object holding implementation of A
       // The implementation of inherited A methods is delegated to the A_IMPL object
    }In the above a_ref is the super reference you desired.

  • Difference between fully-specified data types. and generic types

    Hi,
    Can anyone tell me the difference between fully-specified data types and generic types.
    Thanks in advance.
    Regards,
    P.S.

    HI
    Generic table types
    INDEX TABLE
    For creating a generic table type with index access.
    ANY TABLE
    For creating a fully-generic table type.
    Data types defined using generic types can currently only be used for field symbols and for interface parameters in procedures . The generic type INDEX TABLEincludes standard tables and sorted tables. These are the two table types for which index access is allowed. You cannot pass hashed tables to field symbols or interface parameters defined in this way. The generic type ANY TABLE can represent any table. You can pass tables of all three types to field symbols and interface parameters defined in this way. However, these field symbols and parameters will then only allow operations that are possible for all tables, that is, index operations are not allowed.
    Fully-Specified Table Types
    STANDARD TABLE or TABLE
    For creating standard tables.
    SORTED TABLE
    For creating sorted tables.
    HASHED TABLE
    For creating hashed tables.
    Fully-specified table types determine how the system will access the entries in the table in key operations. It uses a linear search for standard tables, a binary search for sorted tables, and a search using a hash algorithm for hashed tables.
    Fully-specified table types determine how the system will access the entries in the table in key operations. It uses a linear search for standard tables, a binary search for sorted tables, and a search using a hash algorithm for hashed tables.
    see this link
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm
    <b>Reward if usefull</b>

  • What is single inheritance, multiple inheritance, and describe Java's notio

    What is single inheritance, multiple inheritance, and describe Java's notion of an interface?
    Can you give me example or reference link? thx

    Single inheritance is getting features like data and methods (functions) from a so called parent class. multiple inheritance is the same but you derive features from multiple parent classes (not supported by java). Interfaces are a way around this because you can inherit multiple interfaces. Inheriting from interfaces is like a promise to implement certain methods that these interfaces define but doesn't implement themselves.
    check around java.sun.com in the tutorials section, you can probably find a text that describes object oriented program and how it is implemented in java.

  • Difference between inheritance and abstract class

    difference between inheritance and abstract class

    See this thread:
    http://forum.java.sun.com/thread.jspa?forumID=24&threadID=663657
    And before Post New Topic, just search in this forums. All most will get answers.

  • Problem with inheritance and outputting values in toString.

    Hey guys, i'm having a major problem with inheritances.
    What i'm trying to do with my program is to create objects in my demo class. Values are passed to several other objects that each do their own calculations of grades and results and then outputs the result in my toString. I followed step by step the instructions in my book on how to setup the inheritance and such. I can only output everything that was created in my superclass, any other thing that was created in an object that belongs to a subclass does not display in the output at all.
    Even if I change or create new instance variables, I can't figure out for the life of myself how to output the other values.
    Because there's so much code to be splitting on the forums, I zipped my whole project in a RAR. I'll link it here
    http://www.4shared.com/file/ZleBitzP/Assign7.html
    The file to run the program is CourseGradesDemo class, everything else is either a subclass or superclass to some part of the program. After you run CourseGradesDemo, you will see the output, and understand what displays and what stays at 0.0 value. If anyone can help me out with this it would be greatly appreciated
    Thanks in advance.

    Basshunter36 wrote:
    Hey guys, i'm having a major problem with inheritances.
    What i'm trying to do with my program is to create objects in my demo class. Values are passed to several other objects that each do their own calculations of grades and results and then outputs the result in my toString. I followed step by step the instructions in my book on how to setup the inheritance and such. I can only output everything that was created in my superclass, any other thing that was created in an object that belongs to a subclass does not display in the output at all.
    Even if I change or create new instance variables, I can't figure out for the life of myself how to output the other values.No idea what you're talking about. Provide an [url http://sscce.org]SSCCE.
    Because there's so much code to be splitting on the forums, I zipped my whole project in a RAR. I'll link it here
    http://www.4shared.com/file/ZleBitzP/Assign7.html
    Not gonna happen. Provide an [url http://sscce.org]SSCCE. And don't say you can't. You definitely can. You may have to spend an hour building a new program from scratch and getting it to reproduce the problem, but if you can't or won't do that, you'll find few people here willing to bother with it.

  • Generate Prime Interface Availability and Utilization Report for unified APs

    Hi,
    I´m trying to generate interface availability and interface utilization report for unified APs on Prime Infrastructure 2.0, but it doesn´t display any information. I have created device health and interface health templates under desing/Monitor configuration/My templates and deployed under Deploy/Monitoring deployment, but it still don´t show any information,
    thaks for your help.

    Hi Alejandro,
    Did you solve this problem? Or is it a bug?
    I face the some issue with you, I just run "Report/Report Launch Pad/Deivce/Interface Utilization"
    and then I create a report for interface utilization.
    But it display nothing when the report run finished.
    I ask some guys in this forum, they said maybe it's a PI2.1 bug.
    BR
    Frank

  • Names of interface tables and interface programs of oracle modules

    Hi all,
    i need urgent and accurate information about the names of interface tables and interface programs of the following oracle modules,R12, or either ther are custom made. Any accurate link refering to the desire information would be much appreciated.
    Plus i need a clear and simple definition and purpose of interface tables and interface program and by what other names are they known in industry.
    Data Object,Oracle Module
    Chart of Accounts,Oracle General Ledger
    Trial Balance,Oracle General Ledger
    Supplier Master,Oracle Payables
    Open Supplier Invoices,Oracle Payables
    Open Supplier Credit/ Debit Memos,Oracle Payables
    Open Supplier Advances,Oracle Payables
    Bank Master,Oracle Cash Management
    Customer Master,Oracle Receivable
    Asset Categories,Oracle Assets
    Asset Master,Oracle Assets
    Item Master,Oracle Inventory
    Item Categories,Oracle Inventory
    Sub Inventory and Locators,Oracle Inventory
    Item On Hand Balances,Oracle Inventory
    Item wise Per unit Cost,Oracle Inventory
    Bill of Material,Oracle Discrete Manufacturing
    Departments,Oracle Discrete Manufacturing
    Operations,Oracle Discrete Manufacturing
    Routings,Oracle Discrete Manufacturing
    Resources,Oracle Discrete Manufacturing
    Overheads,Oracle Discrete Manufacturing
    Employee Master,Approval Hierarchy
    Approval Hierarchy,Approval Hierarchy
    Open Customer Invoices,Oracle Receivables
    Open Customer Credit/ Debit Memos,Oracle Receivables
    Open Customer Advances,Oracle Receivables
    Pending Requisitions,Oracle Purchasing
    Pending Purchase Orders,Oracle Purchasing
    Open Sales Orders,Oracle Order Management
    Price List,Oracle Order Management

    Hi;
    Its metalink note you need to login metalink wiht valid CSI(customer Support Identifier) number to can se note via using note number.
    Please see:
    Oracle EBS Based and Interface tables
    Oracle EBS Based and Interface tables
    Regard
    Helios

Maybe you are looking for

  • How can I merge double CDs, boxsets, and bonus material down to one grouping in iTunes?

    By far the most annoying thing about iTunes to me is that it will separate double albums and songs that have bonus tracks onto two or more albums. I don't understand why iTunes does this. The reason that some albums are released as double albums is t

  • Desktop freezes after startup

    I own a new Imac 27inch with Fusion and today the deskytop is frozen i have had to restart several times. When is is frozen the items such as external drives are not visible. i force restart and then when teh external drives are on teh screen everyth

  • Macbook Pro fails on startup after drive format and OSX reinstall

    Hi all,      I have a 2012 15'' Retina Macbook Pro - pretty new, so it surprises me I'm having this issue.      The problem was pretty sudden - one day upon startup, I would be immediately told that Finder has closed unexpectedly. From this point on,

  • Vb6 deployment and Crystal Report 8.5

    Hi, I tried to deploy a Visual Basic 6 on a client pc that use Crystal Report 8.5. Because no merge files exist for this version of Crystal Report I tried to added all the necessary dll in the deploy package (using visual basic 6 tools deployment). I

  • PiP layout mode

    from prior threads i've seen that the PiP mode in WebCamera was given up on, and i can only seem to set side by side layout mode anyway.  is PiP mode going to be available in the spark version of LCCS? if not, can one the of developers let me know ho