In the statement:
VectorAtDevice data1 = chart.devices;
eclipse tells me:
cannot convert from EnumVector<DeviceTypes,Device<?>> to VectorAtDevice
VectorAtDevice is defined by:
public interface VectorAtDevice
extends VectorAt<DeviceTypes,
Device<?>>{
}
And the first part of the class definition for EnumVector is:
public class EnumVector<K extends Enum<K>,T extends GetType<K>>
extends EnumCollection<K,Integer,Vector2<T>,T>
implements AddElement<T>,
VectorAt<K,T>{
So EnumVector implements VectorAt<K,T> therefore shouldn't EnumVector<DeviceTypes,Device<?>> implement VectorAt<DeviceTypes,Device<?>> which is also implemented by the interface VectorAtDevice. Therefore I fail to see why the cast is necessary.
Also if if I directly use VectorAt<DeviceTypes,Device<?>> instead of VectorAtDevice I don't need the cast but this seems messy.
This post has been edited by s243a: 12 September 2010 - 03:39 AM

New Topic/Question
Reply




MultiQuote








|