123456789101112131415161718 |
- package classes.comparator.elementComparator;
- import classes.HolonElement;
- public class ElemCompOnIsFlexible extends ElementComparator{
- @Override
- public int compare(HolonElement a, HolonElement b) {
- boolean ifA = a.isFlexible();
- boolean ifB = b.isFlexible();
- if (ifA&&!ifB)
- return -1;
- if (!ifA && ifB)
- return 1;
- return 0;
- }
- }
|