This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IntegracionContinua { | |
private static final int CANTIDAD_RECIENTES = 10; | |
private String urlRepositorio; | |
private Constructor constructor; | |
private List<Construccion> construcciones; | |
private Map<Resultado, List<Accion>> accionesAnteResultado; | |
private boolean activo; | |
public void configurar(Repositorio repositorio) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
>>ejemplo.csv | |
ORGANISMO_TIPO | ORGANISMO_NOMBRE | REPRESENTANTE_NOMBRE | REPRESENTANTE_APELLIDO | REPRESENTANTE_MAIL | |
ORGANISMO_CONTROL | Sarasa S.A | Juan | Perez | juan.perez@gmail.com | |
>>ejemplo.json | |
[ | |
{ | |
"tipo": "ORGANISMO_CONTROL", | |
"nombre": "Sarasa S.A", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Validador { | |
private List<Validacion> validaciones; | |
void validar(String usuario, String contrasenia) { | |
var errores = validaciones | |
.map(it -> it.getError(usuario, contrasenia)) | |
.filter(Optional::isPresent) | |
.map(Optional::get); | |
if (!errores.isEmpty()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class Sala { | |
Chatlib chatlib; //O la inyecto o la instancio de alguna forma; | |
Participante anfitrion; | |
Integer limiteParticipantes; | |
Estado estado = new Pendiente(); | |
void iniciar() { | |
estado.iniciar(this); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Organizacion { | |
List<Egreso> egresos; | |
List<ReglaEgreso> reglasEgreso; | |
void validarEgresos() { | |
this.egresos | |
.filter(e -> e.estado.estaPendiente()) | |
.forEach(e -> e.validarCon(this.reglasEgreso)); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const groupBy = (lista, keyExtractor) => { | |
const map = new Map(); | |
lista.forEach(elemento => { | |
const key = keyExtractor(elemento); | |
const value = map.get(key); | |
if (!value) | |
map.set(key, [elemento]); | |
else | |
value.push(elemento); | |
}); |