KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > parsec > ToParser


1 /*****************************************************************************
2  * Copyright (C) Zephyr Business Solutions Corp. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  *****************************************************************************/

8 /*
9  * Created on 2004-11-11
10  *
11  * Author Ben Yu
12  */

13 package jfun.parsec;
14
15 /**
16  * Maps an Object to a Parser.
17  * User code implements this interface to call Parsers.bind(). <br>
18  * <p> a -> Parser b.
19  * @author Ben Yu
20  *
21  * 2004-11-11
22  */

23 public interface ToParser<From, To> extends java.io.Serializable JavaDoc{
24   /**
25    * maps v to a Parser.
26    * @param v the value.
27    * @return the new Parser.
28    */

29   Parser<To> toParser(From v);
30 }
31
Popular Tags