@Override
  public void close() throws ParseException {
    if (!defined()) {
      super.close();
      if (!tmpParserLongs.isEmpty()) {
        parserLongs = new MtasFunctionParserFunction[tmpParserLongs.size()];
        parserLongs = tmpParserLongs.toArray(parserLongs);
      }
      if (!tmpParserDoubles.isEmpty()) {
        parserDoubles = new MtasFunctionParserFunction[tmpParserDoubles.size()];
        parserDoubles = tmpParserDoubles.toArray(parserDoubles);
      }
      if (!tmpConstantLongs.isEmpty()) {
        constantLongs = new long[tmpConstantLongs.size()];
        for (int i = 0; i < tmpConstantLongs.size(); i++) {
          constantLongs[i] = tmpConstantLongs.get(i);
        }
      }
      if (!tmpConstantDoubles.isEmpty()) {
        constantDoubles = new Double[tmpConstantDoubles.size()];
        for (int i = 0; i < tmpConstantDoubles.size(); i++) {
          constantDoubles[i] = tmpConstantDoubles.get(i);
        }
      }
      if (firstType == null) {
        throw new ParseException("incorrect definition: no firstType");
      }
      if (!tmpOperatorList.isEmpty()) {
        number = tmpOperatorList.size();
        if ((tmpTypeList.size() != number) || (tmpIdList.size() != number)) {
          throw new ParseException("incorrect definition additional items");
        } else {
          operatorList = new String[number];
          operatorList = tmpOperatorList.toArray(operatorList);
          typeList = new String[number];
          typeList = tmpTypeList.toArray(typeList);
          idList = new int[number];
          for (int i = 0; i < number; i++) {
            idList[i] = tmpIdList.get(i).intValue();
          }
        }
      } else {
        number = 0;
        operatorList = null;
        typeList = null;
        idList = null;
      }
    }
  }
@ Override public void close ( ) throws ParseException { if ( ! defined ( ) ) { super . close ( ) ; if ( ! tmpParserLongs . isEmpty ( ) ) { parserLongs = new MtasFunctionParserFunction [ tmpParserLongs . size ( ) ] ; parserLongs = tmpParserLongs . toArray ( parserLongs ) ; } if ( ! tmpParserDoubles . isEmpty ( ) ) { parserDoubles = new MtasFunctionParserFunction [ tmpParserDoubles . size ( ) ] ; parserDoubles = tmpParserDoubles . toArray ( parserDoubles ) ; } if ( ! tmpConstantLongs . isEmpty ( ) ) { constantLongs = new long [ tmpConstantLongs . size ( ) ] ; for ( int i = 0 ; i < tmpConstantLongs . size ( ) ; i ++ ) { constantLongs [ i ] = tmpConstantLongs . get ( i ) ; } } if ( ! tmpConstantDoubles . isEmpty ( ) ) { constantDoubles = new Double [ tmpConstantDoubles . size ( ) ] ; for ( int i = 0 ; i < tmpConstantDoubles . size ( ) ; i ++ ) { constantDoubles [ i ] = tmpConstantDoubles . get ( i ) ; } } if ( firstType == null ) { throw new ParseException ( "incorrect definition: no firstType" ) ; } if ( ! tmpOperatorList . isEmpty ( ) ) { number = tmpOperatorList . size ( ) ; if ( ( tmpTypeList . size ( ) != number ) || ( tmpIdList . size ( ) != number ) ) { throw new ParseException ( "incorrect definition additional items" ) ; } else { operatorList = new String [ number ] ; operatorList = tmpOperatorList . toArray ( operatorList ) ; typeList = new String [ number ] ; typeList = tmpTypeList . toArray ( typeList ) ; idList = new int [ number ] ; for ( int i = 0 ; i < number ; i ++ ) { idList [ i ] = tmpIdList . get ( i ) . intValue ( ) ; } } } else { number = 0 ; operatorList = null ; typeList = null ; idList = null ; } } }
/*
(non-Javadoc)

@see mtas.parser.function.util.MtasFunctionParserFunction#close()