© 2006-2007 ETH Zurich

org.ximtec.igesture.batch.core
Class BatchPowerSetValue

java.lang.Object
  extended by org.ximtec.igesture.batch.core.BatchPowerSetValue

public class BatchPowerSetValue
extends Object

Implements the power set parameter of the batch process.

Version:
1.0 Dec 2006
Author:
Ueli Kurmann, igesture@uelikurmann.ch, Beat Signer, signer@inf.ethz.ch

Constructor Summary
BatchPowerSetValue()
           
 
Method Summary
 void addValue(String value)
           
static List<String> createPowerSet(String list, int min, int max)
          Creates the power set for the given list.
 int getMax()
          Returns the maximal length of the list.
 int getMin()
          Returns the minimal length of the list.
 List<String> getValues()
           
 void setMax(int max)
          Sets the maximal length of the list,
 void setMin(int min)
          Sets the minimal length of the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchPowerSetValue

public BatchPowerSetValue()
Method Detail

addValue

public void addValue(String value)

getValues

public List<String> getValues()

createPowerSet

public static List<String> createPowerSet(String list,
                                          int min,
                                          int max)
Creates the power set for the given list.

Parameters:
list - the comma separated list.
min - the minimal length of the lists.
max - the maximal length of the lists.
Returns:
the list containing the power set of lists with the given constraint.

setMax

public void setMax(int max)
Sets the maximal length of the list,

Parameters:
max - the maximal length of the list. The value should be not larger than the length of the original list but it should be larger than getMin().

getMax

public int getMax()
Returns the maximal length of the list.

Returns:
the maximal length of the list.

setMin

public void setMin(int min)
Sets the minimal length of the list.

Parameters:
min - the minimal length of the list. The value should be larger than 0 and smaller than getMax().

getMin

public int getMin()
Returns the minimal length of the list.

Returns:
the minimal length of the power set. The length should be larger than 0 and smaller than getMax().

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.