SimpleFramework.Xml.Core.Builder.Score C# (CSharp) Method

Score() public method

This is used to score this Builder object so that it can be weighed amongst other constructors. The builder that scores the highest is the one that is used for instantiation.
public Score ( Criteria criteria ) : int
criteria Criteria /// this contains the criteria to be used ///
return int
      public int Score(Criteria criteria) {
         int score = 0;
         for(int i = 0; i < list.size(); i++) {
            String name = list.get(i).getName();
            Label label = criteria.get(name);
            if(label == null) {
               return -1;
            }
            score++;
         }
         return score;
      }
      /// <summary>