CSE-8B / PA9 / starter / CharNode.java
CharNode.java
Raw
//File: CharNode.java
//Name: Trai Pham
//Date: 03/09/2020
//Course: CSE 8B
/**

**/
public class CharNode{
  private char data;
  private CharNode next;

/**
@param char variable
@return nothing
Constructor
**/
  public CharNode(char a){
    this.data = a;
    this.next = null;
  }
/**
@param nothing
@return char
getter method to get Data
**/
  public char getData(){
    return this.data;
  }
/**
@param nothing
@return CharNode reference
getter method to get CharNode reference
**/
  public CharNode getNext(){
    return this.next;
  }
/**
@param char
@return nothing
setting method for Data
**/
  public CharNode setData(char newData){
    this.data = newData;
    return this;
  }
/**
@param CharNode reference
@return nothing
setting method for next
**/
  public CharNode setNext(CharNode newNext){
    this.next = newNext;
    return this;
  }

}