Initializes this variable to a string value.
Initializes this variable to an array value. All items are assumed to be defined, so null strings are equivalent to empty strings.
Initializes this variable to a map value. All items are assumed to be defined, so null strings are equivalent to empty strings.
Describes the possible types a variable can have.
Sets the type of this variable to array and sets the data.
Clears this variable back to being undefined.
The length of a value, count of an array or count of a map.
Sets the type of this variable to map and sets the data.
Sets the type of this variable to value and sets the data.
URIVariable value = URIVariable("hello"); URIVariable array = URIVariable(["hello", "world"]); URIVariable map = URIVariable([tuple("foo", "bar")]); // AA converts to tuple list at unspecified order URIVariable mapAA = URIVariable(["foo": "baz"]); assert(!value.isUndefined); assert(!value.isEmpty); assert(!array.isUndefined); assert(!array.isEmpty); assert(!map.isUndefined); assert(!map.isEmpty); assert(!mapAA.isUndefined); assert(!mapAA.isEmpty); assert(value.type == URIVariable.Type.value); assert(array.type == URIVariable.Type.array); assert(map.type == URIVariable.Type.map); assert(mapAA.type == URIVariable.Type.map); assert(value.value == "hello"); assert(array.array == ["hello", "world"]); assert(map.map == [tuple("foo", "bar")]); assert(mapAA.map == [tuple("foo", "baz")]); URIVariable undefined; assert(undefined.isUndefined); assert(undefined.isEmpty); URIVariable empty = URIVariable(cast(string) null); assert(!empty.isUndefined); assert(empty.isEmpty); URIVariable emptyList = URIVariable(cast(string[]) null); assert(emptyList.isUndefined); assert(emptyList.isEmpty); value.clear(); assert(value.isUndefined); assert(value.isEmpty);
Tagged union for template URI variables. Implementation tags the length of the arrays for the type.