sk.uniba.euromath.document.interval
Class IDSelectionAction

java.lang.Object
  extended by sk.uniba.euromath.document.interval.IDSelectionAction
All Implemented Interfaces:
Comparable<IDSelectionAction>

public final class IDSelectionAction
extends Object
implements Comparable<IDSelectionAction>

Action that contains information on ID-level node selection/deselection. Immutable. Ordered by properties in the following order:

Author:
Martin Vysny

Field Summary
 int fromIndex
          If a textual node is selected then this property is an index of first selected character.
 String id
          The node id.
 boolean select
          If true then we should take a selecting action, otherwise we should deselect.
 int toIndex
          If a textual node is selected then this property is an index of first unselected character after the last selected character.
 
Constructor Summary
IDSelectionAction(String id, int fromIndex, int toIndex, boolean select)
          Constructor.
 
Method Summary
 int compareTo(IDSelectionAction o)
           
 boolean equals(Object obj)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public final String id
The node id.


select

public final boolean select
If true then we should take a selecting action, otherwise we should deselect.


fromIndex

public final int fromIndex
If a textual node is selected then this property is an index of first selected character. If non-textual node is selected, this is -1.


toIndex

public final int toIndex
If a textual node is selected then this property is an index of first unselected character after the last selected character. If non-textual node is selected, this is -1.

Constructor Detail

IDSelectionAction

public IDSelectionAction(String id,
                         int fromIndex,
                         int toIndex,
                         boolean select)
Constructor.

Parameters:
id - The node id.
fromIndex - If a textual node is selected then this property is an index of first selected character. If non-textual node is selected, this is -1.
toIndex - If a textual node is selected then this property is an index of first unselected character after the last selected character. If non-textual node is selected, this is -1.
select - If true then we should take a selecting action, otherwise we should deselect.
Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(IDSelectionAction o)
Specified by:
compareTo in interface Comparable<IDSelectionAction>


Copyright 2003-2003-2006 null. All Rights Reserved.