package com.github.bot.curiosone.core.knowledge;

import com.github.bot.curiosone.core.knowledge.interfaces.Vertex;

/**
 * represents a Concepts of a SemanticNetwork.
 */
public class Concept implements Vertex {

  /**
   * Represents the ID of the Concept.
   */
  private final String id;

  /**
   * Constructs this Concept with the given ID.
   * @param id ID of this Concept.
   */
  public Concept(String id) {
    this.id = id;
  }

  /**
   * Returns the ID of this Concept.
   */
  @Override
  public String getId() {
    return id;
  }

  /**
   * Returns a String representation of this Concept.
   */
  public String toString() {
    return getId();
  }

  /**
   * Checks whether this Concept equals to the given Object.
   * @param o the other Concept to be compared against.
   * @return {@code true} if this Concept equals to the other Concept;
   *         {@code false} otherwise
   */
  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o == null || o.getClass() != this.getClass()) {
      return false;
    }
    return this.id.equals(((Concept)o).getId());
  }

  /**
   * Returns the HashCode of this Concept.
   * The HashCode depends on the ID of this Concept.
   */
  @Override
  public int hashCode() {
    int conta = 0;
    for (int x = 0; x < id.length(); x++) {
      conta += id.charAt(x) * 31;
    }
    return conta;
  }
}

@@ -117,17 +117,17 @@
 %0A/**%0A * 
-r
+R
 epresent
@@ -161,16 +161,193 @@
 etwork.%0A
+ * @see  com.github.bot.curiosone.core.nlp.SemanticNetwork The Sentence SemanticNetwork%0A * @see  com.github.bot.curiosone.core.nlp.SemantiRelation The Sentence SemanticRelation%0A
  */%0Apubl
@@ -529,18 +529,32 @@
  @param 
+ 
 id
+%0A   *        
  ID of t
@@ -632,31 +632,32 @@
 %0A  /**%0A   * 
-R
+@r
 eturn
-s
+ 
  the ID of t
@@ -744,23 +744,24 @@
 **%0A   * 
-R
+@r
 eturn
-s
+ 
  a Strin
@@ -933,17 +933,31 @@
  @param 
-o
+ o%0A   *        
  the oth
@@ -1004,16 +1004,17 @@
 @return 
+ 
 %7B@code t
@@ -1063,24 +1063,25 @@
 oncept;%0A   *
+ 
          %7B@c
@@ -1382,24 +1382,24 @@
 is Concept.%0A
-
    * The Has
@@ -1431,32 +1431,76 @@
 f this Concept.%0A
+   * @return  the HashCode of this Concept.%0A
    */%0A  @Overrid

improve Concept javadoc