Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NestedInteger ¶
type NestedInteger interface { // IsInteger returns true if this NestedInteger holds a single integer, // rather than a nested list. IsInteger() bool // GetInteger return the single integer that this NestedInteger holds, if it holds a single integer // The result is undefined if this NestedInteger holds a nested list // So before calling this method, you should have a check GetInteger() int // SetInteger sets this NestedInteger to hold a single integer. SetInteger(value int) // Add sets this NestedInteger to hold a nested list and adds a nested integer to it. Add(elem NestedInteger) // GetList returns the nested list that this NestedInteger holds, if it holds a nested list // The list length is zero if this NestedInteger holds a single integer // You can access NestedInteger's List element directly if you want to modify it GetList() []*NestedInteger }
NestedInteger holds a single integer or nested list.
func NewNestedInteger ¶
func NewNestedInteger() NestedInteger
NewNestedInteger returns a zero value NestedInteger.
Click to show internal directories.
Click to hide internal directories.