I have a generic class which extends another generic class.
The abstract class has 2 type parameters, but I need only one in my functions.
Is it save to just assign it a random like String type, or are there any drawbacks to this?
public abstract class AbstractFoo<T, B>
{
public abstract void read(T item);
}
public class LittleFoo extends AbstractFoo<byte[], String>
{
@Override
public void read(byte[] item)
{
// work here
}
}