This file contains 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
public class Singleton { | |
private static Singleton INSTANCE = new Singleton(); | |
private Singleton() {} | |
public static Singleton getInstance() { | |
return INSTANCE; | |
} | |
} |
This file contains 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
public class Contacto { | |
private static Contacto contacto; | |
private Contacto(Resources resource){ | |
} | |
public Contacto getIntance(Resources res){ | |
if(contacto == null){ | |
contacto = new Contacto(resources); | |
} |
This file contains 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
/** | |
* A nasty method | |
*/ | |
private int obtenerAno(Date FechaRegistro){...} |
This file contains 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<templates> | |
<template autoinsert="true" context="java" deleted="false" description="Import and create slf4j log" enabled="true" name="getLog"> | |
${:import (org.slf4j.Logger, org.slf4j.LoggerFactory)} | |
/** Log de ${enclosing_type} */ | |
private static final Logger LOG = LoggerFactory.getLogger(${enclosing_type}.class); | |
</template> | |
</templates> |
This file contains 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
package parte2; | |
import java.util.Date; | |
public class Amigo { | |
private String nombre; | |
private Date fechaNacimiento; | |
public Amigo(String nombre, Date fechaNacimiento) { | |
this.nombre = nombre; |
This file contains 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
/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d/.test("2007-11-03T13:18") |