Beispiel #1
0
 public void add(StateLawItem newItem)
 {
     StateLawNode temp=first;
     if(first==null)
     {
         first=new StateLawNode(newItem);
         return;
     }
     while(temp.next!=null)
     {
         temp=temp.next;
     }
     temp.next=new StateLawNode(newItem);
     this.lawCount++;
 }
Beispiel #2
0
 private bool addStateLaw(int stateNumber,StateLawItem newLaw)
 {
     StateNode temp = first;
     if(stateNumber <0)
         return false;
     if(count < stateNumber )
         return false;
     for(int i=1; i< stateNumber ;i++)
         temp = temp.next;
     temp.laws.add(newLaw);
     return true;
 }
Beispiel #3
0
 public StateLawNode(StateLawItem newItem)
 {
     this.data=newItem;
     next=null;
 }