}
this.label = initial_label;
- set_topology( state_infinite_right );
+ set_topology( topo_infinite_right );
}
// Infinite right topology
- private final TopoIface<BigInteger[]> state_infinite_right = new TopoIface<BigInteger[]>(){
+ private final TopoIface<BigInteger[]> topo_infinite_right = new TopoIface<BigInteger[]>(){
@Override public boolean can_read(){
return true;
}
// Instance data
private final List<T> array;
- private final TopoIface<T> state_null = new StateNull();
- private final TopoIface<T> state_segment = new StateSegment();
- private final TopoIface<T> state_rightmost = new StateRightmost();
+ private final TopoIface<T> topo_null = new TopoNull();
+ private final TopoIface<T> topo_segment = new TopoSegment();
+ private final TopoIface<T> topo_rightmost = new TopoRightmost();
// Constructor
protected Ariadne_SRMI_Array(List<T> array){
this.array = array;
if( array == null || array.isEmpty() ){
- set_topology( state_null );
+ set_topology( topo_null );
return;
}
if( array.size() == 1 ){
- set_topology( state_rightmost );
+ set_topology( topo_rightmost );
return;
}
- set_topology( state_segment );
+ set_topology( topo_segment );
}
- // StateNull
- private class StateNull implements TopoIface<T>{
+ // TopoNull
+ private class TopoNull implements TopoIface<T>{
@Override
public boolean can_read(){
return false;
}
@Override
public T read(){
- throw new UnsupportedOperationException( "Cannot read from NULL state." );
+ throw new UnsupportedOperationException( "Cannot read from NULL topo." );
}
@Override
public boolean can_step(){
}
@Override
public void step(){
- throw new UnsupportedOperationException( "Cannot step from NULL state." );
+ throw new UnsupportedOperationException( "Cannot step from NULL topo." );
}
@Override
public Topology topology(){
}
}
- // StateSegment
- private class StateSegment implements TopoIface<T>{
+ // TopoSegment
+ private class TopoSegment implements TopoIface<T>{
@Override
public boolean can_read(){
return true;
public void step(){
Ariadne_SRMI_Array.super.step();
if( index().compareTo(BigInteger.valueOf(array.size() - 1)) < 0 )
- set_topology(state_rightmost);
+ set_topology(topo_rightmost);
}
@Override
public Topology topology(){
}
}
- // StateRightmost
- private class StateRightmost implements TopoIface<T>{
+ // TopoRightmost
+ private class TopoRightmost implements TopoIface<T>{
@Override
public boolean can_read(){
return true;
}
@Override
public void step(){
- throw new UnsupportedOperationException( "Cannot step from RIGHTMOST state." );
+ throw new UnsupportedOperationException( "Cannot step from RIGHTMOST topo." );
}
@Override
public Topology topology(){
private final List<T> list;
private int current_index;
- private final TopoIface<T> state_null = new StateNull();
- private final TopoIface<T> state_segment = new StateSegment();
- private final TopoIface<T> state_rightmost = new StateRightmost();
+ private final TopoIface<T> topo_null = new TopoNull();
+ private final TopoIface<T> topo_segment = new TopoSegment();
+ private final TopoIface<T> topo_rightmost = new TopoRightmost();
public Ariadne_SRM_List(List<T> list){
if( list == null || list.isEmpty() ){
this.list = null;
- set_topology( state_null );
+ set_topology( topo_null );
return;
}
this.list = list;
this.current_index = 0;
- set_topology( state_segment );
+ set_topology( topo_segment );
}
- private class StateNull implements TopoIface<T>{
+ private class TopoNull implements TopoIface<T>{
@Override
public boolean can_read(){
return false;
}
@Override
public T read(){
- throw new UnsupportedOperationException( "Cannot read from NULL state." );
+ throw new UnsupportedOperationException( "Cannot read from NULL topo." );
}
@Override
public boolean can_step(){
}
@Override
public void step(){
- throw new UnsupportedOperationException( "Cannot step from NULL state." );
+ throw new UnsupportedOperationException( "Cannot step from NULL topo." );
}
@Override
public Topology topology(){
}
}
- private class StateSegment implements TopoIface<T>{
+ private class TopoSegment implements TopoIface<T>{
@Override
public boolean can_read(){
return true;
if( can_step() ){
current_index++;
}else{
- set_topology( state_rightmost );
+ set_topology( topo_rightmost );
}
}
@Override
}
}
- private class StateRightmost implements TopoIface<T>{
+ private class TopoRightmost implements TopoIface<T>{
@Override
public boolean can_read(){
return true;
}
@Override
public void step(){
- throw new UnsupportedOperationException( "Cannot step from RIGHTMOST state." );
+ throw new UnsupportedOperationException( "Cannot step from RIGHTMOST topo." );
}
@Override
public Topology topology(){