Created
January 29, 2020 11:38
-
-
Save RubyTemple/05c8f6c3c6cdf89ade3914cd230c4aa0 to your computer and use it in GitHub Desktop.
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
/** | |
* | |
* @author RubyTemple | |
*/ | |
public class Evento { | |
private String titolo,testo; | |
private int data; | |
private Utente creatore; | |
public final short MAX_LIKE = 100; | |
private short[] like = new short[100]; | |
private short counter = 0; | |
public Evento(String titolo, String testo, int data, Utente creatore){ | |
this.titolo = titolo; | |
this.testo = testo; | |
this.data = data; | |
this.creatore = creatore; | |
} | |
public String getTitolo(){ | |
return titolo; | |
} | |
public String getTesto(){ | |
return testo; | |
} | |
public int getdData(){ | |
return data; | |
} | |
public Utente getCreatore(){ | |
return creatore; | |
} | |
public void setLike(Utente u){ | |
for(short i = 0 ; i < counter; i++){ | |
if(u.getId() != like[i] || like == null){ | |
like[i] = u.getId(); | |
} | |
} | |
} | |
public short[] getLike(){ | |
return like; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment