Package javax.help

# Class MergeHelpUtilities

java.lang.Object
javax.help.MergeHelpUtilities

public class MergeHelpUtilities extends Object
Common utilities for merge types

## Constructor Summary

Constructors
Constructor
Description
`MergeHelpUtilities()`

## Method Summary

Modifier and Type
Method
Description
`static int`
`compareNames(DefaultMutableTreeNode master, DefaultMutableTreeNode slave)`
Compares name of nodes
`static DefaultMutableTreeNode`
`getChildWithName(DefaultMutableTreeNode parent, String name)`
Returns node with given name
`static Locale`
`getLocale(DefaultMutableTreeNode node)`
Returns locale of node
`static String`
`getNodeName(DefaultMutableTreeNode node)`
Returns name of node
`static boolean`
`haveEqualID(DefaultMutableTreeNode master, DefaultMutableTreeNode slave)`
Method for comparing ID of nodes
`static void`
`markNodes(DefaultMutableTreeNode master, DefaultMutableTreeNode slave)`
Marks nodes with the same name but diferent IDs with their HelpSet title
`static void`
`mergeNodeChildren(String masterMergeType, DefaultMutableTreeNode node)`
Merge a nodes children according the merging rules of the node's merge type
`static void`
`mergeNodes(String masterMergeType, DefaultMutableTreeNode masterNode, DefaultMutableTreeNode slaveNode)`
Merge the nodes according the merging rules of the masterNode's merge type

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MergeHelpUtilities

public MergeHelpUtilities()

## Method Details

### mergeNodes

public static void mergeNodes(String masterMergeType, DefaultMutableTreeNode masterNode, DefaultMutableTreeNode slaveNode)
Merge the nodes according the merging rules of the masterNode's merge type

Parameters:
  `masterMergeType` - The fallback mergeType if masterNode does not have a mergeType
  `masterNode` - The master node to merge into
  `slaveNode` - A secondary node that will merge into the master node

### mergeNodeChildren

public static void mergeNodeChildren(String masterMergeType, DefaultMutableTreeNode node)
Merge a nodes children according the merging rules of the node's merge type

Parameters:
  `masterMergeType` - The fallback mergeType if masterNode does not have a mergeType
  `node` - The node

### getNodeName

public static String getNodeName(DefaultMutableTreeNode node)
Returns name of node

Parameters:
  `node` - The node
Returns:
  The name of node

### getChildWithName

public static DefaultMutableTreeNode getChildWithName(DefaultMutableTreeNode parent, String name)
Returns node with given name

Parameters:
  `parent` - The parent node
  `name` - The name of child
Returns:
  The child with given name

### getLocale

public static Locale getLocale(DefaultMutableTreeNode node)
Returns locale of node

Parameters:
  `node` - The node
Returns:
  The locale object

### compareNames

public static int compareNames(DefaultMutableTreeNode master, DefaultMutableTreeNode slave)
Compares name of nodes

Parameters:
  `master` - The master node
  `slave` - The slave node
Returns:
  negative is master is lexically lower than slave; positive if master is lexically higher than slave and zero if lexically identical.

### haveEqualID

public static boolean haveEqualID(DefaultMutableTreeNode master, DefaultMutableTreeNode slave)
Method for comparing ID of nodes

Parameters:
  `master` - The master node
  `slave` - The slave node
Returns:
  True if ID is the same

### markNodes

public static void markNodes(DefaultMutableTreeNode master, DefaultMutableTreeNode slave)
Marks nodes with the same name but diferent IDs with their HelpSet title

Parameters:
  `master` - The master node to mark
  `slave` - The slave node to mark