mt/src/cl/cromer/mt/EstadosFinales.java

82 lines
1.9 KiB
Java

/* Copyright (c) 2017 Christopher Cromer
* Copyright (c) 2017 Carlos Faúndez
*
* This file is part of mt. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution.
* This file may not be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file.
*/
package cl.cromer.mt;
import java.util.ArrayList;
/**
* Esta clase es un objeto para pasar entre los stage.
*/
class EstadosFinales {
private ArrayList<Integer> estadosExistentes;
private ArrayList<Integer> estadosElegidos;
private Maquina maquina;
/**
* Constructor de la clase que recibe una maquina de turning
*
* @param maquina La maquina de turning a pasar entre stages
*/
EstadosFinales(Maquina maquina) {
this.maquina = maquina;
this.estadosExistentes = maquina.getMaquina().getEstadosExistentes();
}
/**
* Devolver los estados que existen
*
* @return Los estados que existen
*/
ArrayList<Integer> getEstadosExistentes() {
return estadosExistentes;
}
/**
* Cambiar los estados que existen
*
* @param estadosExistentes Los estados nuevos
*/
public void setEstadosExistentes(ArrayList<Integer> estadosExistentes) {
this.estadosExistentes = estadosExistentes;
}
/**
* Devolver los estados elegidos por el usuario
* @return Los estados elegidos
*/
ArrayList<Integer> getEstadosElegidos() {
return estadosElegidos;
}
/**
* Cambiar los estados elegidos por el usuario
*
* @param estadosElegidos Los estados elegidods nuevos
*/
void setEstadosElegidos(ArrayList<Integer> estadosElegidos) {
this.estadosElegidos = estadosElegidos;
}
/**
* Devolver la maquina de turning para usar
* @return La maquina de turning
*/
public Maquina getMaquina() {
return maquina;
}
/**
* Cambiar la maquina de turning del objeto
* @param maquina La maquina
*/
public void setMaquina(Maquina maquina) {
this.maquina = maquina;
}
}