All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.snapscript.core.convert.ScoreMapper Maven / Gradle / Ivy

package org.snapscript.core.convert;

public class ScoreMapper {

   private final Class[] types;
   private final Score[] scores;
   
   public ScoreMapper(Class[] types, Score[] scores) {
      this.types = types;
      this.scores = scores;
   }
   
   public Score map(Class type) {
      for(int i = 0; i < types.length; i++) {
         Class next = types[i];
         
         if(type == next) {
            return scores[i];
         }
      }
      return null;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy