public String toString(){ checkHeadSet(); if(toString == null) toString = toString(this); return toString; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if(!(obj instanceof SenseKey)) return false; final SenseKey other = (SenseKey)obj; if(!lemma.equals(other.getLemma())) return false; if(lexID != other.getLexicalID()) return false; if(pos != other.getPOS()) return false; if(lexFile.getNumber() != other.getLexicalFile().getNumber()) return false; if(isAdjSat != other.isAdjectiveSatellite()) return false; if(isAdjSat){ if(!headLemma.equals(other.getHeadWord())) return false; if(headLexID != other.getHeadID()) return false; } return true; }
cmp = this.getLemma().compareTo(key.getLemma()); if(cmp != 0) return cmp; cmp = Float.compare(this.getSynsetType(), key.getSynsetType()); if(cmp != 0) return cmp; cmp = Float.compare(this.getLexicalFile().getNumber(), key.getLexicalFile().getNumber()); if(cmp != 0) return cmp; cmp = Float.compare(this.getLexicalID(), key.getLexicalID()); if(cmp != 0) return cmp; if(!this.isAdjectiveSatellite() && !key.isAdjectiveSatellite()) return 0; if(!this.isAdjectiveSatellite() & key.isAdjectiveSatellite()) return -1; if(this.isAdjectiveSatellite() & !key.isAdjectiveSatellite()) return 1; cmp = this.getHeadWord().compareTo(key.getHeadWord()); if(cmp != 0) return cmp; return Float.compare(this.getHeadID(), key.getHeadID());
public int getHeadID() { checkHeadSet(); return headLexID; }
public String getHeadWord() { checkHeadSet(); return headLemma; }
this.lexID = lexID; this.adjMarker = adjMarker; this.senseKey = new SenseKey(id.getLemma(), lexID, synset); this.allWords = (hiddenSet != null && !hiddenSet.isEmpty()) ? Collections.unmodifiableList(new ArrayList<IWordID>(hiddenSet)) :