const classafBeanUtils::BeanIdentity

sys::Obj
  afBeanUtils::BeanIdentity

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

static Bool beanEquals(Obj objThis, Obj? obj)

Calculates equality based on BeanId fields.

beanHash

Source

static Int beanHash(Obj objThis)

Calculates a hash value from BeanId fields.

beanToStr

Source

static Str beanToStr(Obj objThis)

Calculates a Str value from BeanId fields.