Package edu.claflin.finder.logic

# Class Node

java.lang.Object
edu.claflin.finder.logic.Node

All Implemented Interfaces:
  `Comparable<Node>`

Direct Known Subclasses:
  `ModuleNode`

public class Node extends Object implements Comparable<Node>
Represents a node in memory. A simple implementation requiring only an identifier.

Version:
  1.1.1 June 16, 2015
Author:
  Charles Allen Schultz II

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `private int`
  `degree`
  `private List<Edge>`
  `edges`
  `private int`
  `freq`
  `private final String`
  `identifier`
  The string representing the node's unique name.
  `private int`
  `intIdentifier`
  `private List<Node>`
  `neighbors`
  `private double`
  `weight`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Node(String identifier)`
  Initializes the Node object.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addEdge(Edge e)`
  Add an Edge to the Node and increase the other statistics accordingly.
  `int`
  `compareTo(Node that)`
  `Node`
  `duplicate()`
  Returns a copy of this Node that is a new object in memory.
  `boolean`
  `equals(Object o)`
  `int`
  `getDegree()`
  Get the Node's in-degree.
  `Edge`
  `getEdge(Node t)`
  `List<Edge>`
  `getEdges()`
  Get the Node's edges
  `int`
  `getFreq()`
  `String`
  `getIdentifier()`
  Access method for the Node's identifier.
  `int`
  `getIntegerIdentifier()`
  Get the index of the Node in its Graph's Node list.
  `List<Node>`
  `getNeighbors()`
  Get the Node's neighbors
  `double`
  `getWeight()`
  Get the Node's weight
  `int`
  `hashCode()`
  `void`
  `incrementFreq()`
  `void`
  `removeEdge(Edge e)`
  `void`
  `setIntegerIdentifier(int i)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### identifier

    private final String identifier
    The string representing the node's unique name.

  - ### intIdentifier

    private int intIdentifier

  - ### freq

    private int freq

  - ### edges

    private List<Edge> edges

  - ### neighbors

    private List<Node> neighbors

  - ### degree

    private int degree

  - ### weight

    private double weight

- ## Constructor Details

  - ### Node

    public Node(String identifier)
    Initializes the Node object.
    Parameters:
      `identifier` - the String representing the Node's identifier.

- ## Method Details

  - ### getIdentifier

    public String getIdentifier()
    Access method for the Node's identifier.
    Returns:
      the String identifying the Node.

  - ### getIntegerIdentifier

    public int getIntegerIdentifier()
    Get the index of the Node in its Graph's Node list.
    Returns:
      the index in the graph node list

  - ### getEdge

    public Edge getEdge(Node t)

  - ### getEdges

    public List<Edge> getEdges()
    Get the Node's edges
    Returns:
      the node's edges

  - ### getNeighbors

    public List<Node> getNeighbors()
    Get the Node's neighbors
    Returns:
      the node's neighbors

  - ### getDegree

    public int getDegree()
    Get the Node's in-degree.
    Returns:
      the node's degree

  - ### getWeight

    public double getWeight()
    Get the Node's weight
    Returns:
      the node's weight

  - ### setIntegerIdentifier

    public void setIntegerIdentifier(int i)

  - ### addEdge

    public void addEdge(Edge e)
    Add an Edge to the Node and increase the other statistics accordingly.
    Parameters:
      `e` - the Edge to add

  - ### removeEdge

    public void removeEdge(Edge e)

  - ### duplicate

    public Node duplicate()
    Returns a copy of this Node that is a new object in memory.
    Returns:
      the copy of the Node

  - ### incrementFreq

    public void incrementFreq()

  - ### getFreq

    public int getFreq()

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### compareTo

    public int compareTo(Node that)
    Specified by:
      `compareTo` in interface `Comparable<Node>`