BrightSide Workbench Full Report + Source Code
org.turro.interest.InterestCategory Class Reference

Public Member Functions

 InterestCategory (ParticipationReason reason, boolean reversed)
 
ParticipationReason getReason ()
 
boolean isReversed ()
 
String getLabel ()
 
String getIcon ()
 
int hashCode ()
 
boolean equals (Object obj)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 28 of file InterestCategory.java.

Constructor & Destructor Documentation

◆ InterestCategory()

org.turro.interest.InterestCategory.InterestCategory ( ParticipationReason  reason,
boolean  reversed 
)

Definition at line 33 of file InterestCategory.java.

33  {
34  this.reason = reason;
35  this.reversed = reversed;
36  }
Here is the caller graph for this function:

Member Function Documentation

◆ equals()

boolean org.turro.interest.InterestCategory.equals ( Object  obj)

Definition at line 85 of file InterestCategory.java.

85  {
86  if (this == obj) {
87  return true;
88  }
89  if (obj == null) {
90  return false;
91  }
92  if (getClass() != obj.getClass()) {
93  return false;
94  }
95  final InterestCategory other = (InterestCategory) obj;
96  if (this.reversed != other.reversed) {
97  return false;
98  }
99  return this.reason == other.reason;
100  }
InterestCategory(ParticipationReason reason, boolean reversed)
Here is the call graph for this function:

◆ getIcon()

String org.turro.interest.InterestCategory.getIcon ( )

Definition at line 60 of file InterestCategory.java.

60  {
61  return switch(reason) {
62  case REASON_SEEN -> "eye";
63  case REASON_ADHERE -> "sticky note";
64  case REASON_APPLY -> "hand point up";
65  case REASON_FOLLOW -> reversed ? "user friends" : "user friends";
66  case REASON_INFO -> "info";
67  case REASON_LIKE -> reversed ? "thumbs up" : "thumbs up";
68  case REASON_PARTICIPATE -> "users cog";
69  case REASON_SPAM -> "comment slash";
70  default -> "question";
71  };
72  }

◆ getLabel()

String org.turro.interest.InterestCategory.getLabel ( )

Definition at line 46 of file InterestCategory.java.

46  {
47  return switch(reason) {
48  case REASON_SEEN -> "Seen";
49  case REASON_ADHERE -> "Adhered to";
50  case REASON_APPLY -> "Applied to";
51  case REASON_FOLLOW -> reversed ? "Followers" : "Following";
52  case REASON_INFO -> "Information";
53  case REASON_LIKE -> reversed ? "Liked me" : "Liked";
54  case REASON_PARTICIPATE -> "Participating";
55  case REASON_SPAM -> "Marked as SPAM";
56  default -> "**";
57  };
58  }

◆ getReason()

ParticipationReason org.turro.interest.InterestCategory.getReason ( )

Definition at line 38 of file InterestCategory.java.

38  {
39  return reason;
40  }

◆ hashCode()

int org.turro.interest.InterestCategory.hashCode ( )

Definition at line 77 of file InterestCategory.java.

77  {
78  int hash = 3;
79  hash = 67 * hash + Objects.hashCode(this.reason);
80  hash = 67 * hash + (this.reversed ? 1 : 0);
81  return hash;
82  }

◆ isReversed()

boolean org.turro.interest.InterestCategory.isReversed ( )

Definition at line 42 of file InterestCategory.java.

42  {
43  return reversed;
44  }

The documentation for this class was generated from the following file: