Rambler's Top100
/*
 *  Copyright (C) 2004 Roman Krylov
 *  rkrylov@mail.ru
 *  
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

package org.JWrapper;

public class function
{
    public static  function0 bind(function1 f, Arg_t arg)
        {
        final Arg_t arg_tmp = arg;
        final function1 f_tmp = f;
        return new function0()
            {
            Arg_t ARG = arg_tmp;
            function1 F = f_tmp;
            public Ret_t Op() throws Exception { return F.Op(ARG); }
            };
        }
    public static  function0 make_const(Ret_t _const)
        {
        final Ret_t const_tmp = _const;
        return new function0()
        {
        Ret_t RET = const_tmp;
        public Ret_t Op() throws Exception { return RET; }
        };
        }
}

Предприятие реального времени №1

На главную   Новости   Карта сайта
  Rambler's Top100