pedviz.algorithms
Class GraphError

java.lang.Object
  extended by pedviz.algorithms.GraphError
All Implemented Interfaces:
java.lang.Comparable

public class GraphError
extends java.lang.Object
implements java.lang.Comparable

Represents an error in a graph Object.

Author:
Luki

Field Summary
static java.lang.String[] errorMessages
           
static int INVALID_SEX_DAD
           
static int INVALID_SEX_MOM
           
static int MISSING_DAD
           
static int MISSING_MOM
           
static int MULTI_PEDIGREES
           
static int SINGLETON
           
 
Constructor Summary
GraphError(int type, Node node)
          Creates a GraphError object for a single node.
GraphError(int type, Node node, java.lang.String message)
          Creates a GraphError object for a single node with a customized message.
GraphError(int type, java.util.Vector<Node> nodes)
          Creates a GraphError object for a collection of nodes.
 
Method Summary
 int compareTo(java.lang.Object arg0)
           
 java.util.Vector<Node> getNodes()
          Returns a collection of all involved nodes.
 int getType()
          Returns the type.
 boolean isMultipleNodes()
          Returns true, when more nodes are involved.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INVALID_SEX_MOM

public static final int INVALID_SEX_MOM
See Also:
Constant Field Values

INVALID_SEX_DAD

public static final int INVALID_SEX_DAD
See Also:
Constant Field Values

SINGLETON

public static final int SINGLETON
See Also:
Constant Field Values

MISSING_MOM

public static final int MISSING_MOM
See Also:
Constant Field Values

MISSING_DAD

public static final int MISSING_DAD
See Also:
Constant Field Values

MULTI_PEDIGREES

public static final int MULTI_PEDIGREES
See Also:
Constant Field Values

errorMessages

public static java.lang.String[] errorMessages
Constructor Detail

GraphError

public GraphError(int type,
                  java.util.Vector<Node> nodes)
Creates a GraphError object for a collection of nodes.

Parameters:
type - error-type
nodes - involved nodes.

GraphError

public GraphError(int type,
                  Node node)
Creates a GraphError object for a single node.

Parameters:
type - error-type.
node - involved node.

GraphError

public GraphError(int type,
                  Node node,
                  java.lang.String message)
Creates a GraphError object for a single node with a customized message.

Parameters:
type - error-type.
node - involved node.
message - message.
Method Detail

getType

public int getType()
Returns the type.

Returns:
the type.

isMultipleNodes

public boolean isMultipleNodes()
Returns true, when more nodes are involved.

Returns:
true, when more nodes are involved.

getNodes

public java.util.Vector<Node> getNodes()
Returns a collection of all involved nodes.

Returns:
a collection of all involved nodes.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object arg0)
Specified by:
compareTo in interface java.lang.Comparable