func (idRange nfTokenIDRange) Slice() []NFTokenID {
	ids := make([]NFTokenID, idRange.Len())
	for i := range ids {
		ids[i] = NFTokenID(i) + idRange.Min
	}
	return ids
}
Slice returns a sorted slice of tkns' NFTokenIDs.
package fat1
import (
	"encoding/json"
	"fmt"
	"strconv"
	"strings"
	"github.com/Factom-Asset-Tokens/factom/jsonlen"
)
type nfTokenIDRange struct {
	Min NFTokenID `json:"min"`
	Max NFTokenID `json:"max"`
}
func newNFTokenIDRange(minMax ...NFTokenID) nfTokenIDRange {
	var min, max NFTokenID
	if len(minMax) >= 2 {
		min, max = minMax[0], minMax[1]
		if min > max {
			min, max = max, min
		}
	} else if len(minMax) == 1 {
		min, max = minMax[0], minMax[0]
	}
	return nfTokenIDRange{Min: min, Max: max}
}
func (idRange nfTokenIDRange) IsJSONEfficient() bool {
	var expandedLen int
	for id := idRange.Min; id <= idRange.Max; id++ {
		expandedLen += id.jsonLen() + len(`,`)
	}
	return idRange.jsonLen() <= expandedLen
}
func (idRange nfTokenIDRange) jsonLen() int {
	return len(`{"min":`) +
		idRange.Min.jsonLen() +
		len(`,"max":`) +
		idRange.Max.jsonLen() +
		len(`}`)
}
func (idRange nfTokenIDRange) IsStringEfficient() bool {
	var expandedLen int
	for id := idRange.Min; id <= idRange.Max; id++ {
		expandedLen += id.jsonLen() + len(`,`)
	}
	return idRange.strLen() <= expandedLen
}
func (idRange nfTokenIDRange) strLen() int {
	return idRange.Min.jsonLen() + len(`-`) + idRange.Max.jsonLen()
}
func (idRange nfTokenIDRange) Len() int {
	return int(idRange.Max - idRange.Min + 1)
}
func (idRange nfTokenIDRange) setInto(tkns NFTokens) error {
	if len(tkns)+idRange.Len() > maxCapacity {
		return fmt.Errorf("%T(len:%v): %T(%v): %v",
			tkns, len(tkns), idRange, idRange, ErrorCapacity)
	}
	for id := idRange.Min; id <= idRange.Max; id++ {
		if err := id.setInto(tkns); err != nil {
			return err
		}
	}
	return nil
}
func (idRange nfTokenIDRange) Valid() error {
	if idRange.Len() > maxCapacity {
		return ErrorCapacity
	}
	if idRange.Min > idRange.Max {
		return fmt.Errorf("Min is greater than Max")
	}
	return nil
}
func (idRange nfTokenIDRange) String() string {
	if !idRange.IsStringEfficient() {
		ids := idRange.Slice()
		return fmt.Sprintf("%v", ids)
	}
	return fmt.Sprintf("%v-%v", idRange.Min, idRange.Max)
}
func (idRange nfTokenIDRange) MarshalJSON() ([]byte, error) {
	if err := idRange.Valid(); err != nil {
		return nil, err
	}
	if !idRange.IsJSONEfficient() {
		ids := idRange.Slice()
		return json.Marshal(ids)
	}
	type n nfTokenIDRange
	return json.Marshal(n(idRange))
}
func (idRange nfTokenIDRange) MarshalText() ([]byte, error) {
	if err := idRange.Valid(); err != nil {
		return nil, err
	}
	if !idRange.IsStringEfficient() {
		ids := idRange.Slice()
		return json.Marshal(ids)
	}
	return []byte(fmt.Sprintf("%v-%v", idRange.Min, idRange.Max)), nil
}