Advertisement
Swamper

fsadf

Nov 22nd, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. public class Test implements DSAComparable{
  2.     private Integer local;
  3.  
  4.     public Test(int local) {
  5.         this.local = local;
  6.     }
  7.  
  8.     @Override
  9.     public boolean less(Object other) {
  10.         return this.local < (Integer)other ? true : false;
  11.     }
  12.  
  13.     @Override
  14.     public Integer getLeastElement() {
  15.         return this.local;
  16.     }
  17.  
  18.     @Override
  19.     public Integer getGreatestElement() {
  20.         return null;
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement