source: trunk/fmgVen/src/net/fmg/ven/arac/SinifBildirenLinkedList.java @ 11

Last change on this file since 11 was 11, checked in by fmguler, 15 years ago

FMG VEN kütüphanesi - ilk import

File size: 1.7 KB
Line 
1/*
2 * SinifBildirenLinkedList.java
3 *
4 * Created on December 16, 2006, 9:06 PM
5 *
6 * Fatih Mehmet Güler
7 */
8
9package net.fmg.ven.arac;
10
11import java.util.LinkedList;
12
13/**
14 * Ýçinde tuttuðu nesne türünü bildiren linked list
15 * @author Fatih
16 */
17public class SinifBildirenLinkedList extends LinkedList{
18    private Class nesneSinifi;
19    private String bagAlani = "";
20   
21    /**
22     * Creates a new instance of SinifBildirenLinkedList
23     */
24    public SinifBildirenLinkedList() {               
25        System.out.println("FmgList, normal LinkedList kipinde çalýþýyor...");
26    }
27   
28    /**
29     * içindeki bileþen türü sýnýfý belirt
30     */
31    public SinifBildirenLinkedList(Class nesneSinifi) {
32        this.nesneSinifi = nesneSinifi;
33        System.out.println("**Uyarý-> bileþen alaný verilmeden çözme henüz yapýlmadý, sorgunuz çalýþmayacak");
34    }
35   
36    /**
37     * içindeki bileþen türü sýnýfý ve o sýnýftaki hangi alana birleþtiðini belirt
38     */
39    public SinifBildirenLinkedList(Class nesneSinifi, String bagAlani) {
40        this.nesneSinifi = nesneSinifi;
41        this.bagAlani = bagAlani;
42    }
43
44    public Class getNesneSinifi() {
45        return nesneSinifi;
46    }
47
48    public void setNesneSinifi(Class nesneSinifi) {
49        this.nesneSinifi = nesneSinifi;
50    }
51
52    //zorlamaya gerek yok, sadece türünü belirlemek çabamýz
53    //public boolean add(E o) {
54    //    if (o.getClass()!=nesneSinifi) throw new RuntimeException("Desteklenmeyen bileþen türü!");       
55    //    return super.add(o);
56    //}
57
58    public String getBagAlani() {
59        return bagAlani;
60    }
61
62    public void setBagAlani(String bagAlani) {
63        this.bagAlani = bagAlani;
64    }
65}
Note: See TracBrowser for help on using the repository browser.