/* * 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 PalavrasRedundancia { private boolean validade; private int tag; //A tag é o número do conjunto private boolean erro; public PalavrasRedundancia(){ this.validade = false; this.erro = false; this.tag = 0; } public void leituraEspecial(int tag){ if(this.tag == tag){ this.validade = false; this.tag = -1; } } public void inserirErro(){ this.erro = true; } public boolean hasError(){ return this.erro; } public int getTag(){ return this.tag; } public boolean isValid(){ return this.validade; } public void writeAWord(int tag){ this.validade = true; this.tag = tag; } }