I am trying to define a Java class which could be used for generic types, but I want to define the constructors for possible parameter types like Character, or an object type I can manually define.
The class I am trying to create is called:
public class Repeated<T> implements Pict {
private T[][] elements;
private double scale;
public Repeated(T[][] elems) {
elements = elems;
}
}
So I want to add a constructor that adds a Character Array and does something specific if only T is the Type Character. Is it possible? Or should I make this an Interface, then implement it later?