code: public static boolean isLeapYear(
          int kullishay,
          int vahid,
          int yearOfVahid
      ) {
  
          if ((kullishay < 1) || (kullishay > 3)) {
              throw new IllegalArgumentException("Major cycle (kull-i-shai) out of range 1-3: " + kullishay);
          } else if ((vahid < 1) || (vahid > 19)) {
              throw new IllegalArgumentException("Vahid cycle out of range 1-19: " + vahid);
          } else if ((yearOfVahid < 1) || (yearOfVahid > 19)) {
              throw new IllegalArgumentException("Year out of range 1-19: " + yearOfVahid);
          }
  
          int relgregyear = getRelatedGregorianYear(kullishay, vahid, yearOfVahid);
  
          if (relgregyear < 2015) {
              return GregorianMath.isLeapYear(relgregyear + 1);
          } else {
              int index = relgregyear - 2015;
              return (NEWROZ[index + 1] - NEWROZ[index] == 366);
          }
  
      }
docs: /*[deutsch]
  <p>Ist das angegebene Badi-Jahr ein Schaltjahr? </p>
  
  @param   kullishay       major cycle of 361 years (only values 1, 2 or 3 are permitted)
  @param   vahid           19-year-cycle (in range 1-19)
  @param   yearOfVahid     year in range 1-19
  @return  boolean
  @throws  IllegalArgumentException in case of any inconsistencies