com.novell.zos.jdl
Class CharRange

java.lang.Object
  extended by org.python.core.PyObject
      extended by org.python.core.PySequence
          extended by com.novell.zos.jdl.CharRange
All Implemented Interfaces:
java.io.Serializable

public class CharRange
extends org.python.core.PySequence

Define lexical character string range of values for ParameterSpace scheduling.

This class represents a set of strings which exist inclusively between an upper and lower boundary string. Strings within the range are ordered as follows:

   1.  Longer strings always appear after shorter strings.
       For example, 'aaaa' appears after 'bbb'.  This differs
       from traditional dictionary order, but is more useful.
   2.  Strings of the same length are sorted in dictionary order,
       according to the defined lexical order of the character set.  
   3.  The lexical order of characters is determined by their
       position in charSet in the constructor.
   4.  Character orderings are case sensitive.  Two characters
       differing only by case (such as 'a' and 'A') have no
       special relation to each other.  They are completely
       unique characters.

A typical use of this class is to define a range of character strings and split it up into many smaller subranges for parallel processing. The following is an example of this usage:

   range = CharRange("ACGT", "", "TTTTTTT");
   pspace = ParameterSpace()
   pspace.appendDimension("dna",range)
   pspace.setMaxJobletSize(10000)
   self.schedule(MyJoblet,pspace,())
   

The above code defines a string range consisting of all DNA sequences up to length 7. Then adds the range to a ParameterSpace which sets the split up (JobletSize) into unique subsets of 10000 sequences, and passes to schedule to schedule the parallel processing.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.python.core.PyObject
org.python.core.PyObject.ConversionException
 
Field Summary
 
Fields inherited from class org.python.core.PyObject
TYPE
 
Constructor Summary
CharRange(java.lang.String charSet, java.lang.String first, java.lang.String last)
          Create a new string range definition.
 
Method Summary
 
Methods inherited from class org.python.core.PySequence
__delitem__, __delslice__, __eq__, __finditem__, __finditem__, __ge__, __getitem__, __getslice__, __gt__, __iter__, __le__, __lt__, __ne__, __nonzero__, __setitem__, __setitem__, __setslice__, __tojava__, isMappingType, isNumberType
 
Methods inherited from class org.python.core.PyObject
__abs__, __add__, __and__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __cmp__, __coerce__, __coerce_ex__, __complex__, __contains__, __delattr__, __delattr__, __delete__, __delitem__, __delslice__, __dir__, __div__, __divmod__, __findattr__, __findattr__, __findattr_ex__, __finditem__, __float__, __floordiv__, __get__, __getattr__, __getattr__, __getitem__, __getnewargs__, __getslice__, __hash__, __hex__, __iadd__, __iand__, __idiv__, __idivmod__, __ifloordiv__, __ilshift__, __imod__, __imul__, __index__, __int__, __invert__, __ior__, __ipow__, __irshift__, __isub__, __iternext__, __itruediv__, __ixor__, __len__, __long__, __lshift__, __mod__, __mul__, __neg__, __not__, __oct__, __or__, __pos__, __pow__, __pow__, __radd__, __rand__, __rdiv__, __rdivmod__, __reduce__, __reduce_ex__, __reduce_ex__, __repr__, __rfloordiv__, __rlshift__, __rmod__, __rmul__, __ror__, __rpow__, __rrshift__, __rshift__, __rsub__, __rtruediv__, __rxor__, __set__, __setattr__, __setattr__, __setitem__, __setslice__, __str__, __sub__, __truediv__, __unicode__, __xor__, _add, _and, _callextra, _cmp, _div, _divmod, _doget, _doget, _doset, _eq, _floordiv, _ge, _gt, _iadd, _iand, _idiv, _idivmod, _ifloordiv, _ilshift, _imod, _imul, _in, _ior, _ipow, _irshift, _is, _isnot, _isub, _itruediv, _ixor, _jcall, _jcallexc, _jthrow, _le, _lshift, _lt, _mod, _mul, _ne, _notin, _or, _pow, _rshift, _sub, _truediv, _xor, asDouble, asIndex, asIndex, asInt, asInt, asIterable, asLong, asName, asName, asString, asString, asStringOrNull, asStringOrNull, delDict, delType, dispatch__init__, equals, fastGetClass, fastGetDict, getDict, getDoc, getType, hashCode, implementsDescrDelete, implementsDescrSet, invoke, invoke, invoke, invoke, invoke, invoke, isCallable, isDataDescr, isIndex, isSequenceType, noAttributeError, readonlyAttributeError, setDict, setType, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharRange

public CharRange(java.lang.String charSet,
                 java.lang.String first,
                 java.lang.String last)
Create a new string range definition.

Defines a range of strings starting with first and ending with last. Longer strings are "greater than" shorter strings, and lexical ordering among equal-length strings is determined by the ordering of characters in charSet.

If last is "greater than" first then the set is defined in reverse order, such that longer strings appear first, and strings of the same length appear in the reverse lexical order of that defined by charSet.

Parameters:
charSet - The character set over which the range is defined. Lexical order of characters is determined by their position in this string, with leftmost characters being ordered first.
first - The first string in the set.
last - The last string in the set.
Throws:
Thrown - if first or last contain characters not in charSet


Copyright (c) 2011 Novell, Inc. All rights reserved.