const classcamAxonPlugin::Ref

sys::Obj
  camAxonPlugin::Ref : camAxonPlugin::RecId

@Js
@Serializable { simple=true }

Ref is used to model a record identifier and optional display string.

defVal

Source

const static Ref defVal := nullRef

Default is nullRef

dis

Source

Str dis()

Return disVal or if not available, then return id

disVal

Source

Str? disVal()

Optional display string for what the identifier references or null.

equals

Source

virtual override Bool equals(Obj? that)

Equality is based on id only (not dis).

fromStr

Source

static new fromStr(Str id)

Make with simple id

gen

Source

static Ref gen()

Generate a unique Ref.

hash

Source

virtual override Int hash()

Hash id

id

Source

Str id()

Identifier which does not include the leading @

isIdChar

Source

static Bool isIdChar(Int char)

Is the given character a valid id char:

  • A - Z
  • a - z
  • 0 - 9
  • _ : - . ~
isNull

Source

virtual override Bool isNull()

Null ref has id value of "null"?

make

Source

static new make(Str id, Str? dis)

Construct with id string and optional display string.

makeWithDis

Source

static new makeWithDis(Ref ref, Str? dis := null)

Construct with Ref id string and optional display string.

nullRef

Source

const static Ref nullRef := Ref.<ctor>("null")

Null ref is "@null"

toCode

Source

Str toCode()

Return "@id"

toStr

Source

virtual override Str toStr()

String format is id which does not include the leading @. Use toCode to include leading @.