Ejemplo n.º 1
0
        public int CompareTo(Interval o)
        {
            if (!(o is Intervalable))
            {
                return(-1);
            }
            Intervalable other      = (Intervalable)o;
            int          comparison = this.start - other.getStart();

            return(comparison != 0 ? comparison : this.end - other.getEnd());
        }
Ejemplo n.º 2
0
        public override bool Equals(Object o)
        {
            if (!(o is Intervalable))
            {
                return(false);
            }
            Intervalable other = (Intervalable)o;

            return(this.start == other.getStart() &&
                   this.end == other.getEnd());
        }