Пример #1
0
 PositionCheckNode(
     ElementAccessMode mode,
     RType containerType,
     Object positionValue,
     int dimensionIndex,
     int numDimensions,
     boolean exact,
     boolean replace) {
   this.positionClass = positionValue.getClass();
   this.dimensionIndex = dimensionIndex;
   this.numDimensions = numDimensions;
   this.replace = replace;
   this.containerType = containerType;
   this.castNode = PositionCastNode.create(mode, replace);
   if (positionValue instanceof String || positionValue instanceof RAbstractStringVector) {
     boolean useNAForNotFound = !replace && isListLike(containerType) && mode.isSubscript();
     characterLookup =
         new PositionCharacterLookupNode(
             mode, numDimensions, dimensionIndex, useNAForNotFound, exact);
   }
 }