com.mikepenz.fastadapter.items.AbstractItem.getIdentifier()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(74)

本文整理了Java中com.mikepenz.fastadapter.items.AbstractItem.getIdentifier()方法的一些代码示例,展示了AbstractItem.getIdentifier()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractItem.getIdentifier()方法的具体详情如下:
包路径:com.mikepenz.fastadapter.items.AbstractItem
类名称:AbstractItem
方法名:getIdentifier

AbstractItem.getIdentifier介绍

暂无

代码示例

代码示例来源:origin: mikepenz/FastAdapter

/**
 * If this item equals to the given identifier
 *
 * @param id identifier
 * @return true if identifier equals id, false otherwise
 */
@Override
public boolean equals(int id) {
  return id == getIdentifier();
}

代码示例来源:origin: mikepenz/FastAdapter

/**
 * If this item equals to the given object
 *
 * @param o
 * @return
 */
@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  AbstractItem<?, ?> that = (AbstractItem<?, ?>) o;
  return getIdentifier() == that.getIdentifier();
}

代码示例来源:origin: mikepenz/FastAdapter

/**
   * the hashCode implementation
   *
   * @return
   */
  @Override
  public int hashCode() {
    return Long.valueOf(getIdentifier()).hashCode();
  }
}

代码示例来源:origin: mikepenz/FastAdapter

/**
 * If this item equals to the given object
 *
 * @param o
 * @return
 */
@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  AbstractItem<?, ?> that = (AbstractItem<?, ?>) o;
  return mIdentifier == that.getIdentifier();
}

相关文章

微信公众号

最新文章

更多