I do not have a way of really testing this without completely the other code I am working on but I just wanted to confirm this. If I am trying to code this statement:
If a node contains only positives, set decision to true.
If it contains only negatives set it to false
where pos is an ArrayList of all of the positive examples of a node and neg is othe same but with all of the negatives. Would this statement be valid?
if(!node.pos.isEmpty() && node.neg.isEmpty())
node.decision = true;
if(!node.neg.isEmpty() && node.pos.isEmpty())
node.decision = false;
So pretty much I am wondering if i put that the ArrayList is != null then does that mean that it must contain at least 1 thing and then when I put == null then that means it is empty?