ElemCompOnIsActivated.java 371 B

1234567891011121314151617181920
  1. package classes.comparator.elementComparator;
  2. import classes.HolonElement;
  3. public class ElemCompOnIsActivated extends ElementComparator {
  4. @Override
  5. public int compare(HolonElement a, HolonElement b) {
  6. boolean ifA = a.isActive();
  7. boolean ifB = b.isActive();
  8. if (ifA&&!ifB)
  9. return -1;
  10. if (!ifA && ifB)
  11. return 1;
  12. return 0;
  13. }
  14. }