/* ============================================================================ * File: RecursiveFunction.java * ---------------------------------------------------------------------------- * * This file is part of the Microsoft Supplemental UI Library for Visual J# .NET * Code Samples. * * Copyright (C) 2003 Microsoft Corporation. All rights reserved. * * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, * WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. * ============================================================================ */ package RecursionDemo; /** * All recursive function have to implement this interface to let RecursionStack * interface manage it. */ public interface RecursiveFunction { /** * Returns name of the recursive function */ public String getName(); /** * Returns description of the recursive function */ public String getDescription(); /** * Returns executing code of the recursive function */ public String getCode(); /** * Does recursion for 'n' steps. Returns computed value */ public int doRecursion(int n); /** * Sets 'stack' as the RecursionStack for this recursive function */ public void setRecursionStack(RecursionStack stack); }