You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

40 lines
814 B

  1. package structures.basic;
  2. import java.util.HashSet;
  3. import java.util.Set;
  4. import utils.BasicObjectBuilders;
  5. import utils.StaticConfFiles;
  6. public class BetterUnit extends Unit {
  7. Set<String> keywords;
  8. public BetterUnit() {}
  9. public BetterUnit(Set<String> keywords) {
  10. super();
  11. this.keywords = keywords;
  12. }
  13. public Set<String> getKeywords() {
  14. return keywords;
  15. }
  16. public void setKeywords(Set<String> keywords) {
  17. this.keywords = keywords;
  18. };
  19. public static void main(String[] args) {
  20. BetterUnit unit = (BetterUnit)BasicObjectBuilders.loadUnit(StaticConfFiles.humanAvatar, 0, BetterUnit.class);
  21. Set<String> keywords = new HashSet<String>();
  22. keywords.add("MyKeyword");
  23. unit.setKeywords(keywords);
  24. System.err.println(unit.getClass());
  25. }
  26. }