org.apache.velocity.test.provider

Class TestProvider

public class TestProvider extends Object

This class is used by the testbed. Instances of the class are fed into the context that is set before the AST is traversed and dynamic content generated.

Version: $Id: TestProvider.java,v 1.21.8.1 2004/03/03 23:23:06 geirm Exp $

Author: Jason van Zyl

Field Summary
Objectob
static StringPUB_STAT_STRING
booleanstate
intstateint
Stringtitle
Method Summary
booleanallEmpty(Object[] list)
Integerbang()
Stringchop(String string, int i)
Chop i characters off the end of a string.
Stringconcat(Object[] strings)
Stringconcat(List strings)
Stringconcat(String a, String b)
Stringget(String key)
Test the ability of vel to use a get(key) method for any object type, not just one that implements the Map interface.
String[]getArray()
ChildgetChild()
ArrayListgetCustomers()
ArrayListgetCustomers2()
ListgetEmptyList()
StringgetFoo()
HashtablegetHashtable()
ListgetList()
Object[]getMenu()
StringgetName()
PersongetPerson()
ArrayListgetRelSearches()
HashtablegetSearch()
StackgetStack()
booleangetStateFalse()
booleangetStateTrue()
StringgetThrow()
StringgetTitle()
VectorgetVector()
Objectme()
StringobjConcat(List objects)
StringobjectArrayMethod(Object[] o)
Stringparse(String a, Object o, String c, String d)
Stringput(String key, Object o)
Test the ability of vel to use a put(key) method for any object type, not just one that implements the Map interface.
voidsetBangStart(Integer i)
voidsetState(Boolean state)
voidsetTitle(String title)
StringshowPerson(Person person)
booleantheAPLRules()
StringtoString()

Field Detail

ob

Object ob

PUB_STAT_STRING

public static String PUB_STAT_STRING

state

boolean state

stateint

int stateint

title

String title

Method Detail

allEmpty

public boolean allEmpty(Object[] list)

bang

public Integer bang()

chop

public String chop(String string, int i)
Chop i characters off the end of a string.

Parameters: string String to chop. i Number of characters to chop.

Returns: String with processed answer.

concat

public String concat(Object[] strings)

concat

public String concat(List strings)

concat

public String concat(String a, String b)

get

public String get(String key)
Test the ability of vel to use a get(key) method for any object type, not just one that implements the Map interface.

getArray

public String[] getArray()

getChild

public Child getChild()

getCustomers

public ArrayList getCustomers()

getCustomers2

public ArrayList getCustomers2()

getEmptyList

public List getEmptyList()

getFoo

public String getFoo()

getHashtable

public Hashtable getHashtable()

getList

public List getList()

getMenu

public Object[] getMenu()

getName

public String getName()

getPerson

public Person getPerson()

getRelSearches

public ArrayList getRelSearches()

getSearch

public Hashtable getSearch()

getStack

public Stack getStack()

getStateFalse

public boolean getStateFalse()

getStateTrue

public boolean getStateTrue()

getThrow

public String getThrow()

getTitle

public String getTitle()

getVector

public Vector getVector()

me

public Object me()

objConcat

public String objConcat(List objects)

objectArrayMethod

public String objectArrayMethod(Object[] o)

parse

public String parse(String a, Object o, String c, String d)

put

public String put(String key, Object o)
Test the ability of vel to use a put(key) method for any object type, not just one that implements the Map interface.

setBangStart

public void setBangStart(Integer i)

setState

public void setState(Boolean state)

setTitle

public void setTitle(String title)

showPerson

public String showPerson(Person person)

theAPLRules

public boolean theAPLRules()

toString

public String toString()
Copyright B) 2002 Apache Software Foundation. All Rights Reserved.