net.sf.extjwnl.data.Word.equals()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(101)

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

Word.equals介绍

[英]Two words are equal if their parent Synsets are equal and they have the same lemma
[中]如果两个单词的父语法集相等,并且它们有相同的引理,那么它们就是相等的

代码示例

代码示例来源:origin: hltfbk/Excitement-Open-Platform

@Override
public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (getClass() != obj.getClass())
    return false;
  ExtJwnlSensedWord other = (ExtJwnlSensedWord) obj;
  if (wordObj == null) {
    if (other.wordObj != null)
      return false;
  } else if (!wordObj.equals(other.wordObj))
    return false;
  return true;
}

代码示例来源:origin: extjwnl/extjwnl

/**
 * Returns all the pointers of the synset that contains this word whose source is this word.
 */
public List<Pointer> getPointers() {
  List<Pointer> result = new ArrayList<>(0);
  for (Pointer pointer : getSynset().getPointers()) {
    if (this.equals(pointer.getSource())) {
      result.add(pointer);
    }
  }
  return result;
}

代码示例来源:origin: net.sf.extjwnl/extjwnl

/**
 * Returns all the pointers of the synset that contains this word whose source is this word.
 */
public List<Pointer> getPointers() {
  List<Pointer> result = new ArrayList<>(0);
  for (Pointer pointer : getSynset().getPointers()) {
    if (this.equals(pointer.getSource())) {
      result.add(pointer);
    }
  }
  return result;
}

相关文章