Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. private int x;
  2. private int y;
  3. // Delete me and add more instance variables here
  4. private String borough;
  5. private String race;
  6. private int perStop;
  7. private String arrestMade;
  8. private String summIssue;
  9. private boolean forceUsed;
  10. private String precinct;
  11. private int datestop;
  12. private int timestop;
  13. private int age;
  14. private String gender;
  15.  
  16. =======
  17.  
  18. x = Integer.parseInt(row[107]);
  19. y = Integer.parseInt(row[108]);
  20. borough = row[100];
  21. race = row[81];
  22. if (!(row[10].indexOf("*") >= 0)){
  23. perStop = Integer.parseInt(row[10]);
  24. }
  25. else{
  26. perStop = 0;
  27. }
  28. arrestMade = row[14];
  29. summIssue = row[16];
  30. forceUsed = false;
  31. for (int i = 32; i <= 40; i++)
  32. {
  33. if(row[i].equals("Y"))
  34. {
  35. forceUsed = true;
  36. }
  37. }
  38. // Continue storing instance varaibles
  39. // Be sure to convert to appropriate type
  40.  
  41. precinct = row[1];
  42. datestop= Integer.parseInt(row[3]);
  43. timestop = Integer.parseInt(row[4]);
  44. if(row[83].trim() == "")
  45. {
  46. age = Integer.parseInt(row[83]);
  47. }
  48.  
  49. gender = row[80];
  50.  
  51.  
  52.  
  53. =====
  54.  
  55. public boolean isPct(int p){
  56. return getPct() == p;
  57. }
  58. public int getDate(){
  59. return datestop;
  60. }
  61. public boolean isDate(int date){
  62. return getDate() == date;
  63. }
  64. public int getTime(){
  65. return timestop;
  66. }
  67. public boolean isTime(int time){
  68. return getTime() == time;
  69. }
  70. public int getAge(){
  71. return age;
  72. }
  73. public boolean isAge(int a){
  74. return getAge() == a;
  75. }
  76. public String getGender(){
  77. return gender;
  78. }
  79. public boolean isGender(String a){
  80. return gender.equals(a);
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement