私は非常に単純な問題を抱えています-
DEClient
コンストラクターが次のような名前のクラスがあります-
public DEClient(List<DEKey> keys) {
process(keys);
}
そしてDEKey
クラスはこんな感じ-
public class DEKey {
private String name;
private String value;
public DEKey(){
name = null;
value = null;
}
public DEKey(String name, String value){
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
今、私はDEClient
コンストラクターをインスタンス化しようとしています。そのためには、が必要List<DEKey>
です。
だから私がしたことは、 (を返す)と値としてDEKey
以下のようにクラスをインスタンス化したことです。service.getKeys()
String
id
DEKey dk = new DEKey(service.getKeys(), id);
//The below line throws exception whenever I am running.
DEClient deClient = new DEClient((List<DEKey>) dk);
私がここで何をしているのですか?