1234567891011121314151617181920212223242526272829303132333435363738394041 |
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package cache;
- /**
- *
- * @author Juninho Carlos
- */
- public class ConjuntoRedundancia {
- private BlocoRedundancia[] blocosRed;
-
- public ConjuntoRedundancia(){
- this.blocosRed = new BlocoRedundancia[4];
- for(int i = 0; i < 4; i++){
- this.blocosRed[i] = new BlocoRedundancia();
- }
- }
-
- public BlocoRedundancia[] getBlocos(){
- return this.blocosRed;
- }
-
- public boolean hasErroInPalavra(int bloco, int palavra){
- return this.blocosRed[bloco].getPalavra(palavra).hasError();
- }
-
- public boolean isPalavraValida(int bloco, int palavra){
- return this.blocosRed[bloco].getPalavras()[palavra].isValid();
- }
-
- public Integer getTagFromPalavra(int bloco, int palavra){
- return this.blocosRed[bloco].getTagFromAWord(palavra);
- }
-
- public void writeAWord(int tag, int bloco, int palavra){
- this.blocosRed[bloco].writeAWord(palavra, tag);
- }
- }
|