I have created a base interface which is implemented by some objects and I also have an array of interfaces which given a string return the objects mentioned. (a bit difficult to explain, better look the code :D) Then I want to pass this to the global object through some overloaded methods (at the beginning looked super clever, but it now seems technically impossible) Could I get any closer to what I want?

```
interface Stats { }

public class ObjectA implements Subscriber.Stats { // MORE THINGS }

public class ObjectB implements Subscriber.Stats { // MORE THINGS }

// MORE OBJECTS

```

This is the second interface which transforms a String into one of the classes from above

```
public interface Parser<T extends Stats> {

    T parse(String data);

}

```

Now I have an array of implementations of the this interface I want to give me different results (ObjectA, ObjectB, ObjectC ..)

```
private final Parser<Stats>[] parsers = new Parser[] {
        new Parser() {
            @Override
            public Stats parse(String data) {
                return new ObjectA();
            }
        },
        new Parser() {
            @Override
            public Stats parse(String data) {
                return new ObjectB();
            }
        }
};

```

Now comes the "clever" part where I want to make something that may not be possible.

If I loop the array of *parsers* and each position gives me ObjectA, ObjectB due to Polymorphism I could call an overloaded method of a class with a signature like `push(ObjectA)` `push(ObjectB)`, right??... **Well this obviously doesn't work but is there any strategies I could use to accomplish this?**

The loop would be: 

```
for (int i = 0; i < operations.length; i++) {               
    dataHolder.push(parsers[i].parse(operations[i].getResult()));
}

```

**EDITED** 
The problem is the method `T parse (String value)` is treated as if it returns `Stats` and not `T extends Stats` therefore when I call `push` it says there is no `push(Stats)` method