Back to project page Dumbledroid.
The source code is released under:
Copyright (c) 2013, Leocadio Tin? All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...
If you think the Android project Dumbledroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package io.leocad.dumbledoreexample.models; /*from w w w. j a va 2s. c o m*/ import io.leocad.dumbledroid.data.AbstractModel; import io.leocad.dumbledroid.data.DataType; import java.util.List; public class Sith extends AbstractModel { private static final long serialVersionUID = 7828325552043546133L; private String side; private List<String> names; private Suit suit; private int kills; public Sith() { super("https://dl.dropbox.com/u/5135185/dumbledroid/sith.xml", 15 * 60 * 1000); //15 min cache } @Override protected DataType getDataType() { return DataType.XML; } public String getSide() { return side; } public void setSide(String side) { this.side = side; } public String getNames() { StringBuffer sb = new StringBuffer(); for (String name : names) { sb.append(name) .append(", "); } //Remove the last comma and space (", ") int sbLength = sb.length(); sb.delete(sbLength-2, sbLength); return sb.toString(); } public void setNames(List<String> names) { this.names = names; } public Suit getSuit() { return suit; } public void setSuit(Suit suit) { this.suit = suit; } public int getKills() { return kills; } public void setKills(int kills) { this.kills = kills; } }