public class Square extends java.lang.Object implements java.lang.Comparable<Square>
Modifier and Type | Field and Description |
---|---|
static <any> |
CREATOR |
protected java.lang.String |
description
A user written description for the square
|
protected long |
favouredBy
The number of how many people are following the square
|
protected java.lang.String[] |
favourers |
protected java.lang.String |
id
The square id
|
boolean |
isFacebookEvent
Whether this square is for a Facebook event or not
|
boolean |
isFacebookPage
Whether this square is for a Facebook page or not
|
protected java.util.Calendar |
lastMessageDate
The date of the last message sent to this square
|
protected java.lang.String |
lastMessageDateString |
protected double |
lat
The latitude value of the position of the square
|
protected double |
lon
The longitude value of the position of the square
|
protected java.util.Locale |
myLocale |
protected java.lang.String |
name
The square name
|
protected java.lang.String |
ownerId
The id of the user that has created the square
|
protected SquareState |
squareState
The state of the square
|
protected static java.lang.String |
TAG |
protected java.lang.String |
type |
protected long |
views
The number of how many people have seen this square
|
Modifier | Constructor and Description |
---|---|
protected |
Square(Parcel in) |
|
Square(java.lang.String id,
java.lang.String name,
double lat,
double lon,
java.lang.String type,
java.lang.String ownerId)
Creates a Square object
|
|
Square(java.lang.String id,
java.lang.String name,
java.lang.String description,
java.lang.String geoloc,
java.lang.String ownerId,
java.lang.String favouredBy,
java.lang.String[] favourers,
java.lang.String views,
java.lang.String state,
java.lang.String lastMessageDate,
java.lang.String type,
java.util.Locale l)
Creates a Square object
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Square another) |
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
formatTime()
Creates a string out of the lastMessageDate Calendar object
|
java.lang.String |
getDescription() |
long |
getFavouredBy() |
java.lang.String |
getId() |
java.lang.String |
getInitials()
Extracts the initials of the name of the Square
|
java.util.Calendar |
getLastMessageDate() |
java.lang.String |
getLastMessageDateString() |
double |
getLat() |
double |
getLon() |
java.lang.String |
getName() |
java.lang.String |
getOwnerId() |
SquareState |
getSquareState() |
java.lang.String |
getType() |
long |
getViews() |
int |
hashCode() |
void |
setDescription(java.lang.String description) |
void |
setId(java.lang.String id) |
void |
setLat(double lat) |
void |
setLon(double lon) |
void |
setName(java.lang.String name) |
void |
setOwnerId(java.lang.String ownerId) |
void |
setType(java.lang.String type) |
java.lang.String |
toString() |
void |
writeToParcel(Parcel dest,
int flags) |
protected static final java.lang.String TAG
protected java.lang.String id
protected java.lang.String name
protected java.lang.String description
protected double lat
protected double lon
protected java.lang.String type
protected java.lang.String ownerId
protected long favouredBy
protected java.lang.String[] favourers
protected long views
protected SquareState squareState
SquareState
protected java.util.Calendar lastMessageDate
protected java.lang.String lastMessageDateString
protected java.util.Locale myLocale
public boolean isFacebookEvent
public boolean isFacebookPage
public static final <any> CREATOR
public Square(java.lang.String id, java.lang.String name, double lat, double lon, java.lang.String type, java.lang.String ownerId)
id
- id of the squarename
- name of the squarelat
- latitude of the position of the squarelon
- longitude of the position of the squaretype
- type of squareownerId
- id of the owner of the squarepublic Square(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String geoloc, java.lang.String ownerId, java.lang.String favouredBy, java.lang.String[] favourers, java.lang.String views, java.lang.String state, java.lang.String lastMessageDate, java.lang.String type, java.util.Locale l)
id
- id of the squarename
- name of the squaredescription
- description of the Squaregeoloc
- latitude and longitude of the square. Format is "lat,long"ownerId
- id of the owner of the squarefavouredBy
- how many people have favoured the squarefavourers
- an array of IDs of the people who favoured the squareviews
- how many times the square has been seenstate
- the state of the squarelastMessageDate
- the date of the last message sent on the squaretype
- the type of the squarel
- the localeprotected Square(Parcel in)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String getId()
public void setId(java.lang.String id)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public double getLat()
public void setLat(double lat)
public double getLon()
public void setLon(double lon)
public java.lang.String getType()
public void setType(java.lang.String type)
public java.lang.String getOwnerId()
public void setOwnerId(java.lang.String ownerId)
public long getFavouredBy()
public long getViews()
public SquareState getSquareState()
public java.lang.String getLastMessageDateString()
public java.util.Calendar getLastMessageDate()
public java.lang.String formatTime()
public java.lang.String getInitials()
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(Square another)
compareTo
in interface java.lang.Comparable<Square>
public int describeContents()
public void writeToParcel(Parcel dest, int flags)