code: private boolean checkTetrahedral(int u, int[] mapping) {
  
          int v = mapping[u];
          
          if (targetTypes[v] != null && targetTypes[v] != Type.Tetrahedral)
              return false;
  
          ITetrahedralChirality queryElement = (ITetrahedralChirality) queryElements[u];
          ITetrahedralChirality targetElement = (ITetrahedralChirality) targetElements[v];
  
          IAtom queryAtom = query.getAtom(u);
          IAtom targetAtom = target.getAtom(v);
  
          int[] us = neighbors(queryElement, queryMap);
          us = map(u, v, us, mapping);
          int p = permutationParity(us);
  
          // check if unspecified was allowed
          if (targetTypes[v] == null) {
              if (queryAtom instanceof SMARTSAtom)
                  return ((SMARTSAtom) queryAtom).chiralityMatches(targetAtom, 0, p);
              else
                  return ((QueryAtom)queryAtom).getExpression().matches(targetAtom, 0);
          }
  
          // target was non-tetrahedral
          if (targetTypes[v] != Type.Tetrahedral) return false;
  
          int[] vs = neighbors(targetElement, targetMap);
          int q = permutationParity(vs) * parity(targetElement.getStereo());
  
          if (queryAtom instanceof SMARTSAtom)
              return ((SMARTSAtom) queryAtom).chiralityMatches(targetAtom, q, p);
          else {
              q *= p;
              if (q < 0)
                  return ((QueryAtom) queryAtom).getExpression().matches(targetAtom, IStereoElement.LEFT);
              else if (q > 0)
                  return ((QueryAtom) queryAtom).getExpression().matches(targetAtom, IStereoElement.RIGHT);
              else
                  return ((QueryAtom) queryAtom).getExpression().matches(targetAtom, 0);
          }
      }
docs: Verify the tetrahedral stereochemistry (clockwise/anticlockwise) of atom
  {@code u} is preserved in the target when the {@code mapping} is used.
  
  @param u       tetrahedral index in the target
  @param mapping mapping of vertices
  @return the tetrahedral configuration is preserved