com.izforge.izpack.panels.userinput.processorclient
Class ValuesProcessingClient

java.lang.Object
  extended by com.izforge.izpack.api.handler.DefaultConfigurationHandler
      extended by com.izforge.izpack.panels.userinput.processorclient.ValuesProcessingClient
All Implemented Interfaces:
Configurable, ProcessingClient, Serializable
Direct Known Subclasses:
PasswordGroup

public class ValuesProcessingClient
extends DefaultConfigurationHandler
implements ProcessingClient

Simple implementation of ProcessingClient that wraps an array of string values.

Author:
Tim Anderson
See Also:
Serialized Form

Constructor Summary
ValuesProcessingClient(MessageFormat format, String[] values)
          Constructs a ValuesProcessingClient.
ValuesProcessingClient(String[] values)
          Constructs a ValuesProcessingClient.
 
Method Summary
 String getFieldContents(int index)
          Returns the contents of the field indicated by index.
 int getNumFields()
          Returns the number of sub-fields.
 String getText()
          Returns the field contents as one formatted or concatenated text.
 String[] getValues()
          Returns the values.
 
Methods inherited from class com.izforge.izpack.api.handler.DefaultConfigurationHandler
addConfigurationOption, getConfigurationOption, getConfigurationOptionValue, getConfigurationOptionValue, getConfigurationOptionValue, getNames, readParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.izforge.izpack.api.data.Configurable
addConfigurationOption, getConfigurationOption, getConfigurationOptionValue, getConfigurationOptionValue, getConfigurationOptionValue, getNames
 

Constructor Detail

ValuesProcessingClient

public ValuesProcessingClient(String[] values)
Constructs a ValuesProcessingClient.

Parameters:
values - the values to process

ValuesProcessingClient

public ValuesProcessingClient(MessageFormat format,
                              String[] values)
Constructs a ValuesProcessingClient.

Parameters:
format - the formatter
values - the values to process
Method Detail

getValues

public String[] getValues()
Returns the values.

Specified by:
getValues in interface ProcessingClient
Returns:
the values

getNumFields

public int getNumFields()
Returns the number of sub-fields.

Specified by:
getNumFields in interface ProcessingClient
Returns:
the number of sub-fields

getFieldContents

public String getFieldContents(int index)
Returns the contents of the field indicated by index.

Specified by:
getFieldContents in interface ProcessingClient
Parameters:
index - the index of the sub-field from which the contents is requested.
Returns:
the contents of the indicated sub-field.
Throws:
IndexOutOfBoundsException - if the index is out of bounds.

getText

public String getText()
Returns the field contents as one formatted or concatenated text.

Specified by:
getText in interface ProcessingClient
Returns:
the field contents


Copyright © 2018. All rights reserved.