/* * POSITION_AR.java * * Created on February 6, 2008, 1:59 PM * * MORE UP TO DATE VERSION IS IN LIST_AR_purge with classname POSITION * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package list_ar_purge; /** * * @author suchenek */ //Copyright Dr. Marek A. Suchenek, 2005, 2006, 2007, 2008 - 2025 public class POSITION_AR { public int index; public POSITION_AR(int value) { this.index = value; cnt3.incr(); //cost of position manipulation } public boolean isEqual(POSITION_AR p) { cnt3.incr(); //cost of position manipulation return (this.index == p.index); } public boolean isValidPosition(LIST_AR L) { cnt3.incr(); //cost of position manipulation return (index >= 0 && index <= L.End().index); } }