         else
           result.value = value
     result
-
-

  isValid: (aValue) ->
    @validate(aValue, false)
  createValue: (aValue, aOptions)->
    aOptions = @mergeOptions(aOptions)
    #aOptions.name = @name unless aOptions.name
    vType = createObject @Class, aOptions
    Value aValue, vType
  create: @::createValue
  clone: (aOptions)->@create(null, aOptions)
  createType: (aOptions)->
    delete aOptions.value if aOptions
    createObject @Class, aOptions

    aOptions = @mergeOptions(aOptions)
    aOptions.name = @name unless aOptions.name
    @createType aOptions
  clone: @::cloneType
  # Get aType class from the encoded string.
  fromString: (aString, aOptions)->
    aString = @encoding.decode aString, aOptions if @encoding
