Advertisement
CheeseKeg

WordEntry.java

Sep 29th, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. package com.cheesekeg.wordcount;
  2.  
  3. /**
  4.  * @author Brandon DeRosier
  5.  * @since 0.1
  6.  * @version 0.1
  7.  */
  8. public class WordEntry {
  9.  
  10.     private String word;
  11.     private int count;
  12.    
  13.     public WordEntry(String word) {
  14.         this.word = word;
  15.         count = 0;
  16.     }
  17.    
  18.     public String GetWord() {
  19.         return word;
  20.     }
  21.    
  22.     public void SetWord(String word) {
  23.         this.word = word;
  24.     }
  25.    
  26.     public int GetCount() {
  27.         return count;
  28.     }
  29.    
  30.     public void IncrementCount() {
  31.         ++count;
  32.     }
  33.    
  34.     @Override
  35.     public String toString() {
  36.         return count + ": " + word;
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement