@Test public void shouldNotHaveMatchingRoots(){ HiveChord chordC = new HiveChord("cmaj7"); HiveChord chordCSharp = new HiveChord("c#maj7"); HiveChord chordC4 = new HiveChord("c4maj7"); HiveChord chordCSharp4 = new HiveChord("c#4maj7"); assertFalse(chordC.hasMatchingRoot(chordCSharp)); assertFalse(chordC4.hasMatchingRoot(chordCSharp4)); }
public boolean hasMatchingRoot(HiveChord chord) { if ((chord != null) && this.getChordName().toLowerCase().contains(chord.getChordName().toLowerCase())) { return true; } if ((chord != null) && chord.getChordName().toLowerCase().contains(this.getChordName().toLowerCase())) { return true; } if ((chord != null) && chord.getChordName().equalsIgnoreCase(this.getChordName().toLowerCase())) { return true; } if ((chord != null) && isEqualOrTriadMatch(chord)) { return true; } return false; }
HiveChord extends ChordBase implements IWeightable, IInfluenceable, Serializable { public boolean hasMatchingRoot(HiveChord chord) { if ((chord != null) && this.getChordName().toLowerCase().contains(chord.getChordName().toLowerCase())) { return true; } if ((chord != null) && chord.getChordName().toLowerCase().contains(this.getChordName().toLowerCase())) { return true; } if ((chord != null) && chord.getChordName().equalsIgnoreCase(this.getChordName().toLowerCase())) { return true; } if ((chord != null) && isEqualOrTriadMatch(chord)) { return true; } return false; } }
HiveChord extends ChordBase implements IWeightable, IInfluenceable, Serializable { public boolean hasMatchingRoot(HiveChord chord) { if ((chord != null) && this.getChordName().toLowerCase().contains(chord.getChordName().toLowerCase())) { return true; } if ((chord != null) && chord.getChordName().toLowerCase().contains(this.getChordName().toLowerCase())) { return true; } if ((chord != null) && chord.getChordName().equalsIgnoreCase(this.getChordName().toLowerCase())) { return true; } if ((chord != null) && isEqualOrTriadMatch(chord)) { return true; } return false; } HiveChord();  HiveChord(String chordName); }
HiveChord extends ChordBase implements IWeightable, IInfluenceable, Serializable { public boolean hasMatchingRoot(HiveChord chord) { if ((chord != null) && this.getChordName().toLowerCase().contains(chord.getChordName().toLowerCase())) { return true; } if ((chord != null) && chord.getChordName().toLowerCase().contains(this.getChordName().toLowerCase())) { return true; } if ((chord != null) && chord.getChordName().equalsIgnoreCase(this.getChordName().toLowerCase())) { return true; } if ((chord != null) && isEqualOrTriadMatch(chord)) { return true; } return false; } HiveChord();  HiveChord(String chordName); boolean isEqual(HiveChord chord); boolean isEqual(String chordName); Integer getId(); void setId(Integer id); @Override void setFileName(String fileName); @Override String getFileName(); String getChordName(); String getRawChordName(); void setChordName(String chordName); String extractRoot(String chordName); boolean isEqualOrTriadMatch(HiveChord harmonicLoopChord); boolean hasMatchingRoot(HiveChord chord); boolean hasMatchingRoot(HarmonicLoop harmonicLoop); @Override WeightClass getVerticalWeight(); @Override void setVerticalWeight( WeightClass weight); @Override WeightClass getTimeseriesWeight(); @Override void setTimeseriesWeight(WeightClass weight); @Override WeightClass getThemeWeight(); @Override void setThemeWeight(WeightClass weight); @Override void setRhythmicWeight( WeightClass weight); @Override WeightClass getRhythmicWeight(); @Override WeightClass getEqWeight(); @Override void setEqWeight(WeightClass weight); @Override Integer getTotalWeight(); ChordCategory getChordCatagory(); void setChordCatagory(ChordCategory chordCatagory); WeightClass getHarmonicWeight(); void setHarmonicWeight(WeightClass harmonicWeight); List<String> getChordTypes(); void setChordTypes(List<String> chordTypes); }
HiveChord extends ChordBase implements IWeightable, IInfluenceable, Serializable { public boolean hasMatchingRoot(HiveChord chord) { if ((chord != null) && this.getChordName().toLowerCase().contains(chord.getChordName().toLowerCase())) { return true; } if ((chord != null) && chord.getChordName().toLowerCase().contains(this.getChordName().toLowerCase())) { return true; } if ((chord != null) && chord.getChordName().equalsIgnoreCase(this.getChordName().toLowerCase())) { return true; } if ((chord != null) && isEqualOrTriadMatch(chord)) { return true; } return false; } HiveChord();  HiveChord(String chordName); boolean isEqual(HiveChord chord); boolean isEqual(String chordName); Integer getId(); void setId(Integer id); @Override void setFileName(String fileName); @Override String getFileName(); String getChordName(); String getRawChordName(); void setChordName(String chordName); String extractRoot(String chordName); boolean isEqualOrTriadMatch(HiveChord harmonicLoopChord); boolean hasMatchingRoot(HiveChord chord); boolean hasMatchingRoot(HarmonicLoop harmonicLoop); @Override WeightClass getVerticalWeight(); @Override void setVerticalWeight( WeightClass weight); @Override WeightClass getTimeseriesWeight(); @Override void setTimeseriesWeight(WeightClass weight); @Override WeightClass getThemeWeight(); @Override void setThemeWeight(WeightClass weight); @Override void setRhythmicWeight( WeightClass weight); @Override WeightClass getRhythmicWeight(); @Override WeightClass getEqWeight(); @Override void setEqWeight(WeightClass weight); @Override Integer getTotalWeight(); ChordCategory getChordCatagory(); void setChordCatagory(ChordCategory chordCatagory); WeightClass getHarmonicWeight(); void setHarmonicWeight(WeightClass harmonicWeight); List<String> getChordTypes(); void setChordTypes(List<String> chordTypes);  }