import java.util.*; public class Database { Vector dat; public Database() { dat = new Vector(); } public void addData(Data dat) { System.out.println("sdf"); this.dat.add(dat); } public void search(Data da) { System.out.println("search"); int edge =0 ; Vector base = new Vector(); edge = da.getEdgeNum(); //エッジの数が探索同じものを探索 for(int i =0;i < dat.size();i++) { if(edge == dat.get(i).getEdgeNum()) { base.add(dat.get(i)); System.out.println("Ans"+dat.get(i).getName()); } } //角いるかを探索 if( null !=da.haveKakus()) { base = haveKakus(base); } //角が無いかを探索 if( null == da.haveKakus()) { base = notKakus(base); } //曲がっているかを探索 if(null !=da.haveMagarus()) { base =haveMagarus(base); } if(null==da.haveMagarus()) { base = notMagarus(base); } //真っ直ぐかを探索 if(null !=da.haveMaxtugus()) { base = haveMaxtusugus(base); } if(null==da.haveMaxtugus()) { base = notMaxtusugus(base); } } public Vector haveKakus(Vector base) { Vector base_temp = new Vector(); for(int i= 0; i notKakus(Vector base) { Vector base_temp = new Vector(); for(int i= 0; i haveMagarus(Vector base) { Vector base_temp = new Vector(); for(int i= 0; i notMagarus(Vector base) { Vector base_temp = new Vector(); for(int i= 0; i notMaxtusugus(Vector base) { Vector base_temp = new Vector(); for(int i= 0; i haveMaxtusugus(Vector base) { Vector base_temp = new Vector(); for(int i= 0; i