func (this *NameValueList) SetNameAndValue(name string, value interface{}) {
	nv := NewNameValue(name, value)
	this.SetNameValue(nv)
}
Set a namevalue object in this list.
package core
import (
	"bytes"
	"container/list"
)
type NameValueList struct {
	list.List
	indentation int
	listName    string  
	stringRep   string
	separator   string
}
func NewNameValueList(listName string) *NameValueList {
	this := &NameValueList{}
	this.listName = listName
	this.separator = ";"
	return this
}
func (this *NameValueList) GetIndentation() string {
	var retval bytes.Buffer
	for i := 0; i < this.indentation; i++ {
		retval.WriteString(" ")
	}
	return retval.String()
}
func (this *NameValueList) Concatenate(nvl *NameValueList, topFlag bool) {
	if nvl == nil {
		return
	}
	if !topFlag {
		for e := nvl.Front(); e != nil; e = e.Next() {
		    this.PushBack(e)
		}
	} else {
		first := this.Front() 
		for e := nvl.Front(); e != nil; e = e.Next() {
		    this.InsertBefore(e, first)
		}
	}
}
func (this *NameValueList) Sprint(s string) {
	if s == "" {
		this.stringRep += this.GetIndentation()
		this.stringRep += "<null>\n"
		return
	}
	if s == "}" || s == "]" {
		this.indentation--
	}
	this.stringRep += this.GetIndentation()
	this.stringRep += s
	this.stringRep += "\n"
	if s == "{" || s == "[" {
		this.indentation++
	}
}
func (this *NameValueList) String() string {
	if this.Len() == 0 {
		return ""
	}
	var encoding bytes.Buffer  
	for e := this.Front(); e != nil; e = e.Next() {
		nv := e.Value.(*NameValue)
		encoding.WriteString(nv.String())
		if e.Next() != nil {
			encoding.WriteString(this.separator)
		}
	}
	return encoding.String()
}
func (this *NameValueList) SetSeparator(sep string) {
	this.separator = sep
}
func (this *NameValueList) AddNameValue(nv *NameValue) {
	if nv == nil {
		return
	}
	this.PushBack(nv)
}
func (this *NameValueList) AddNameAndValue(name string, value interface{}) {
	nv := NewNameValue(name, value)
	this.AddNameValue(nv)
}
func (this *NameValueList) SetNameValue(nv *NameValue) {
	this.Delete(nv.name)
	this.AddNameValue(nv)
}