java_util

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 1 Imported by: 2

README

UUID-info

  1. explain dubbo-go-hessian2 strut UUID
  • JavaServer -> create UUID -> GO Client -> UUID struct (PASS)
  • dubbo-go-hessian2 cannot create UUID strut
  • see jdk source code of class:[java.util.UUID] learning how to create UUID struct
  • see https://github.com/satori/go.uuid
  1. explain dubbo-go-hession2 strut locale -java object locale -> go struct Locale (PASS), but currently implemented are objects enumerated in java. See class:java.util.Locale -First convert to struct LocaleHandle and then call GetLocaleFromHandler(localeHandler *LocaleHandle) function to convert to struct Locale -You can use the language.ParseBase("zh-CN") function in the golang.org/x/text/language package to convert the value of locale.String() get go struct and do other things

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locale added in v1.9.2

type Locale struct {
	// contains filtered or unexported fields
}

Locale => java.util.Locale

func GetLocaleFromHandler added in v1.9.2

func GetLocaleFromHandler(localeHandler *LocaleHandle) *Locale

GetLocaleFromHandler is use LocaleHandle get Locale

func ToLocale added in v1.9.2

func ToLocale(e LocaleEnum) *Locale

ToLocale get locale from enum

func (*Locale) County added in v1.9.2

func (locale *Locale) County() string

func (*Locale) Lang added in v1.9.2

func (locale *Locale) Lang() string

func (*Locale) String added in v1.9.2

func (locale *Locale) String() string

type LocaleEnum added in v1.9.2

type LocaleEnum int

LocaleEnum is Locale enumeration value

const (
	ENGLISH LocaleEnum = iota
	FRENCH
	GERMAN
	ITALIAN
	JAPANESE
	KOREAN
	CHINESE
	SIMPLIFIED_CHINESE
	TRADITIONAL_CHINESE
	FRANCE
	GERMANY
	ITALY
	JAPAN
	KOREA
	CHINA
	PRC
	TAIWAN
	UK
	US
	CANADA
	CANADA_FRENCH
	ROOT
)

Locale struct enum

type LocaleHandle added in v1.9.2

type LocaleHandle struct {
	Value string `hessian:"value"`
}

LocaleHandle => com.alibaba.com.caucho.hessian.io.LocaleHandle object

func (LocaleHandle) JavaClassName added in v1.9.2

func (LocaleHandle) JavaClassName() string

type UUID

type UUID struct {
	MostSigBits  int64 `hessian:"mostSigBits"`
	LeastSigBits int64 `hessian:"leastSigBits"`
}

java.util.UUID

func (UUID) JavaClassName

func (UUID) JavaClassName() string

func (UUID) String

func (uuid UUID) String() string

String returns a string object representing this UUID. The UUID string representation is as described by this BNF:

UUID = <time_low> "-" <time_mid> "-"

<time_high_and_version> "-"
<variant_and_sequence> "-"
<node>

time_low = 4*<hexOctet> time_mid = 2*<hexOctet> time_high_and_version = 2*<hexOctet> variant_and_sequence = 2*<hexOctet> node = 6*<hexOctet> hexOctet = <hexDigit><hexDigit> hexDigit =

"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
| "a" | "b" | "c" | "d" | "e" | "f"
| "A" | "B" | "C" | "D" | "E" | "F"

Returns: A string representation of this UUID

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL