19 lines
390 B
Go
19 lines
390 B
Go
package plist
|
|
|
|
// NodeInt plist 现成的Int节点, 可以作为例子
|
|
type NodeInt struct {
|
|
Node
|
|
}
|
|
|
|
// Compare plist 现成的Int节点Compare覆盖
|
|
func (fl *NodeInt) Compare(v INode) bool {
|
|
return fl.GetValue().(int) > v.GetValue().(int)
|
|
}
|
|
|
|
// NewNodeInt plist 现成的Int节点, New一个NodeInt
|
|
func NewNodeInt(v int) (fl *NodeInt) {
|
|
fl = new(NodeInt)
|
|
fl.SetValue(v)
|
|
return fl
|
|
}
|