const classafBeanUtils::BeanIdentity

sys::Obj
  afBeanUtils::BeanIdentity

@Js

equals(), hash() and toStr() methods using fields annotated with BeanId. Sample usage:

class User {
  @BeanId Int? id
  @BeanId Str? name
          Str? notUsed 

  override Int hash() {
    BeanIdentity.beanHash(this)
  }
  
  override Bool equals(Obj? obj) {
    BeanIdentity.beanEquals(this, obj)
  }
  
  override Str toStr() {
    BeanIdentity.beanToStr(this)
  }
}

@see BeanId

beanEquals

Source

const static Bool beanEquals(Obj objThis, Obj? obj)

Calculates equality based on BeanId fields.

beanHash

Source

const static Int beanHash(Obj objThis)

Calculates a hash value from BeanId fields.

beanToStr

Source

const static Str beanToStr(Obj objThis)

Calculates a Str value from BeanId fields.