dk.brics.xpath.evaluator
Class StatusMap

java.lang.Object
  extended by dk.brics.xpath.evaluator.StatusMap

public class StatusMap
extends Object

Status map used by XPathEvaluator.


Nested Class Summary
static class StatusMap.Status
          Status values.
 
Constructor Summary
StatusMap(Set<Integer> nodes)
          Constructs an empty status map with given set of nodes.
StatusMap(StatusMap other)
          Constructs a copy of the given status map.
 
Method Summary
static String description(Node n)
           
 StatusMap.Status get(int node)
          Gets the status value for a given node.
 Set<Integer> getALL()
          Gets the set of nodes with status ALL (or NEVER or DEFINITE).
 Set<Integer> getNodes()
          Gets the set of nodes.
 Set<Integer> getNONE()
          Gets the set of nodes with status NONE (or NEVER).
 Set<Integer> getSOME()
          Gets the set of nodes with status SOME (or DEFINITE).
 void glb(int node, StatusMap.Status status)
           
 void merge(int node, StatusMap.Status status)
          Merges status mapping for a given node with the given status value.
static void prettyprint(PrintStream out, StatusMap sm, XMLGraph xg)
           
 void put(int node, StatusMap.Status status)
          Puts status for a given node (existing mappings will be removed)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusMap

public StatusMap(Set<Integer> nodes)
Constructs an empty status map with given set of nodes.


StatusMap

public StatusMap(StatusMap other)
Constructs a copy of the given status map. The set of nodes is not copied, only referenced.

Method Detail

description

public static String description(Node n)

get

public StatusMap.Status get(int node)
Gets the status value for a given node.

Parameters:
node - node
Returns:
status value

getALL

public Set<Integer> getALL()
Gets the set of nodes with status ALL (or NEVER or DEFINITE).

Returns:
set of ALL (or NEVER or DEFINITE) nodes

getNodes

public Set<Integer> getNodes()
Gets the set of nodes.

Returns:
set of nodes

getNONE

public Set<Integer> getNONE()
Gets the set of nodes with status NONE (or NEVER).

Returns:
set of NONE (or NEVER) nodes

getSOME

public Set<Integer> getSOME()
Gets the set of nodes with status SOME (or DEFINITE).

Returns:
set of SOME (or DEFINITE) nodes

glb

public void glb(int node,
                StatusMap.Status status)

merge

public void merge(int node,
                  StatusMap.Status status)
Merges status mapping for a given node with the given status value.

Parameters:
node - node
status - status value

prettyprint

public static void prettyprint(PrintStream out,
                               StatusMap sm,
                               XMLGraph xg)

put

public void put(int node,
                StatusMap.Status status)
Puts status for a given node (existing mappings will be removed)

Parameters:
node - node
status - status value


Copyright © 2005-2010 Anders Møller.