Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
JaVi - Java Vigenere - FrequenzaNijk.java

FrequenzaNijk.java

Caricato da: Teutoburgo
Scarica il programma completo

  1. /*
  2.   JaVi - JavaVigenere -   A Java implementation of the Vigenere
  3.                                 cryptographical  algorithm
  4.         Un'implementazione Java dell'algoritmo di
  5.                                 Vigenere per la crittografia
  6.     Copyright (C) 2002 Pierre Blanc
  7.     Pierre Blanc: blanc_teutoburgo@yahoo.it
  8.     http://www.teutoburgo.tk                   (italiano)
  9.     http://teutoburgo.web44.net/indexEn.html   (english)
  10.  
  11.  
  12.     This program is free software; you can redistribute it and/or modify
  13.     it under the terms of the GNU General Public License as published by
  14.     the Free Software Foundation; either version 2 of the License.
  15.  
  16.     This program is distributed in the hope that it will be useful,
  17.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.     GNU General Public License for more details.
  20.  
  21.     You should have received a copy of the GNU General Public License
  22.     along with this program; if not, write to the Free Software
  23.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  24.     or go to      http://www.gnu.org/copyleft/gpl.html
  25.  
  26.  
  27.     Questo  programma è  software  libero; è  lecito redistribuirlo  o
  28.     modificarlo secondo i termini  della Licenza Pubblica Generica GNU
  29.     come è pubblicata dalla Free  Software Foundation, o la versione 2
  30.     della licenza.
  31.     Questo programma  è distribuito nella  speranza che sia  utile, ma
  32.     SENZA  ALCUNA GARANZIA;  senza  neppure la  garanzia implicita  di
  33.     NEGOZIABILITÀ  o di  APPLICABILITÀ PER  UN PARTICOLARE  SCOPO.  Si
  34.     veda la Licenza Pubblica Generica GNU per avere maggiori dettagli.
  35.  
  36.     Questo  programma deve  essere  distribuito assieme  ad una  copia
  37.     della Licenza Pubblica Generica GNU;  in caso contrario, se ne può
  38.     ottenere  una scrivendo  alla Free  Software Foundation,  Inc., 59
  39.     Temple Place, Suite 330, Boston, MA 02111-1307 USA  oppure da
  40.     http://www.gnu.org/copyleft/gpl.html
  41.  
  42.  
  43.     Un grazie sentito a Roberto detto "Piano Man" per l'importante aiuto.
  44.  
  45.  */
  46.  
  47. package JaVi;
  48.  
  49. /**
  50.  *
  51.  * <p>Title: JaVi BO</p>
  52.  * <p>Description: Questa classe viene usata dall'oggetto Vigenere per contare
  53.  * le frequenze di una singola stringa
  54. <br>
  55. This class is used by the Vigenere object in order to count the frequencies
  56. of a single string</p>
  57.  * <p>Copyright: Copyright (c) 2002 Pierre Blanc</p>
  58.  * <p>Company: Teutoburgo</p>
  59.  * @author Pierre Blanc
  60.  * @version 1.0
  61.  */
  62.  
  63. public class FrequenzaNijk {
  64.  
  65.   public FrequenzaNijk(){
  66.   }
  67. /**
  68.  * Il costruttore associa a una stringa la sua frequenza all'interno della
  69.  * chiave
  70.  * <br>
  71.  * The constructor binds a String with its frequency within the key.
  72.  * @param n the String
  73.  * @param f the frequency
  74.  */
  75.   public FrequenzaNijk(String n, double f){
  76.     nijk=n;
  77.     freq=f;
  78.   }
  79.  
  80.   private String nijk;
  81.   private double freq;
  82.  
  83.   public String getNijk(){
  84.     return nijk;
  85.   }
  86.  
  87.   public double getFreq(){
  88.     return freq;
  89.   }
  90.  
  91.   public void setNijk(String nijk){
  92.     this.nijk=nijk;
  93.   }
  94.  
  95.   public void setFreq(double freq){
  96.     this.freq=freq;
  97.   }
  98.  
  99. }