> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: PHXGroup

**Package:** `com.phoenix_int.aserver`

**Class Hierarchy**

```text theme={null}
↳ java.lang.Object
  ↳ com.phoenix_int.aserver.PHXGroup
```

**Declaration**

```java theme={null}
public class PHXGroup
extends java.lang.Object
```

A utility class for holding sub-variables. Internally used to manage groups of variables within the [`PHXSimpleSelfManager`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXSimpleSelfManager) class. To create your own groups, use the [`PHXSimpleSelfManager.addVariable`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXSimpleSelfManager) function.

**See Also:**

* [`PHXSimpleSelfManager`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXSimpleSelfManager)

## Constructor Summary

| Constructor and Description |
| - |
| `PHXGroup(java.lang.String name)` |

## Method Summary

| Modifier and Type | Method and Description |
| - | - |
| `void` | `addGroup(PHXGroup group)` Adds a child group to the group |
| `void` | `addVariable(PHXVariableInfo varInfo)` Stores a variable in the group. |
| `boolean` | `contains(PHXVariableInfo varInfo)` Checks to see if a variable exists in this group |
| `boolean` | `contains(java.lang.String varName)` Checks to see if a variable exists in this group. |
| [`PHXGroup`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXGroup) | `getGroup(java.lang.String childName)` Retrieves a child group. |
| [`PHXGroup`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXGroup) | `getGroup2(java.lang.String childName)` Retrieves a child group. |
| `java.util.Enumeration` | `getGroups()` Retrieves the Enumeration of subgroups in the group. |
| `java.util.Iterator<PHXGroup>` | `getGroups2()` Retrieves all the subgroups in the group |
| `java.lang.String` | `getName()` Retrieves the name of the group |
| `int` | `getNumGroups()` Retrieves the number of subgroups in the group. |
| `int` | `getNumVariables()` Retrieves the number of variables in the group. |
| [`PHXVariableInfo`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXVariableInfo) | `getVariableInfo(java.lang.String varName)` Retrieves a variable from the group. |
| [`PHXVariableInfo`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXVariableInfo) | `getVariableInfo2(java.lang.String varName)` Retrieves a variable from the group. |
| `java.util.Enumeration` | `getVariables()` Retrieves the Enumeration of variables in the group. |
| `java.util.Iterator<PHXVariableInfo>` | `getVariables2()` Retrieves all of the variables in the group. |
| [`PHXGroup`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXGroup) | `makeGroup(java.lang.String childName)` Creates a child group. |
| `void` | `removeAllGroups()` Removes all groups from the group |
| `void` | `removeAllVariables()` Removes all variables from the group |
| `void` | `removeGroup(java.lang.String childName)` Removes a child group. |
| `void` | `removeVariable(PHXVariableInfo varInfo)` Removes a variable |
| `java.lang.String` | `toString()` Converts this to a string |

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

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

## Constructor Detail

### PHXGroup

```java theme={null}
public PHXGroup(java.lang.String name)
         throws PHXInvalidNameException
```

**Parameters:**

* `name` - the name of the group

**Throws:**

* `PHXInvalidNameException`

## Method Detail

### getName

```java theme={null}
public java.lang.String getName()
```

retrieves the name of the group

**Returns:**

* the name of the group

### addGroup

```java theme={null}
public void addGroup(PHXGroup group)
              throws PHXNameAlreadyInUseException,
                     PHXInvalidNameException
```

adds a child group to the group

**Parameters:**

* `group`- the child group

**Throws:**

* PHXNameAlreadyInUseException
* PHXInvalidNameException

### getGroup

```java theme={null}
public PHXGroup getGroup(java.lang.String childName)
                  throws PHXNoSuchObjectException
```

retrieves a child group.

**Parameters:**

* `childName`- the name of the child group

**Returns:**

* the child group

**Throws:**

* `PHXNoSuchObjectException` - thrown if the child group is not found

### getGroup2

```java theme={null}
public PHXGroup getGroup2(java.lang.String childName)
```

retrieves a child group. Does not throw an exception on failure.

**Parameters:**

* `childName`- the name of the child group

**Returns:**

* the child group. Returns null on failure

### makeGroup

```java theme={null}
public PHXGroup makeGroup(java.lang.String childName)
                   throws PHXNameAlreadyInUseException,
                          PHXInvalidNameException
```

creates a child group. If the group already exists, it is retrieved

**Parameters:**

* `childName`- the name of the child group

**Returns:**

* the child group

**Throws:**

* `PHXNameAlreadyInUseException`
* `PHXInvalidNameException`

### removeGroup

```java theme={null}
public void removeGroup(java.lang.String childName)
                 throws java.lang.Exception
```

remove a child group. If the group doesn't exist, it just returns

**Parameters:**

* `childName`- the name of the child group

**Throws:**

* `java.lang.Exception`

### getNumGroups

```java theme={null}
public int getNumGroups()
```

retrieves the number of subgroups in the group.

**Returns:**

* the number of subgroups

### getGroups

```java theme={null}
public java.util.Enumeration getGroups()
```

retrieves the Enumeration of subgroups in the group.

**Returns:**

* an Enumeration of [`PHXGroup`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXGroup) objects

### getGroups2

```java theme={null}
public java.util.Iterator<PHXGroup> getGroups2()
```

retrieves all the subgroups in the group

**Returns:**

* an Iterator of all the [`PHXGroup`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXGroup) objects.

### addVariable

```java theme={null}
public void addVariable(PHXVariableInfo varInfo)
                 throws PHXNameAlreadyInUseException,
                        PHXInvalidNameException
```

stores a variable in the group.

**Parameters:**

* `varInfo`- the variable info structure

**Throws:**

* [`PHXNameAlreadyInUseException`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXNameAlreadyInUseException)
* [`PHXInvalidNameException`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXInvalidNameException)

### getVariableInfo

```java theme={null}
public PHXVariableInfo getVariableInfo(java.lang.String varName)
                                throws PHXNoSuchObjectException
```

retrieves a variable from the group.

**Parameters:**

* `varName`- the name of the variable to get

**Returns:**

* the variable info structure

**Throws:**

* [`PHXNoSuchObjectException`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXNoSuchObjectException) - thrown if the specified variable is not found

### getVariableInfo2

```java theme={null}
public PHXVariableInfo getVariableInfo2(java.lang.String varName)
```

retrieves a variable from the group. Does not throw an Exception on failure.

**Parameters:**

* `varName`- the name of the variable to get

**Returns:**

* the variable info structure, or null if not found

### contains

```java theme={null}
public boolean contains(PHXVariableInfo varInfo)
```

checks to see if a variable exists in this group

**Parameters:**

* `varInfo`- the variable to check, must be an exact match (not just name)

**Returns:**

* true if the variable is in this group

### contains

```java theme={null}
public boolean contains(java.lang.String varName)
```

Checks to see if a variable exists in this group.

**Parameters:**

* `varName`- the name of the variable to check.

**Returns:**

* true if the variable is in this group.

### getNumVariables

```java theme={null}
public int getNumVariables()
```

retrieves the number of variables in the group.

**Returns:**

* the number of variables

### getVariables

```java theme={null}
public java.util.Enumeration getVariables()
```

retrieves the Enumeration of variables in the group.

**Returns:**

* an Enumeration of [`PHXVariableInfo`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXVariableInfo) objects

### getVariables2

```java theme={null}
public java.util.Iterator<PHXVariableInfo> getVariables2()
```

retrieves all of the variables in the group.

**Returns:**

* an Iterator of all the [`PHXVariableInfo`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/2026-r1/com/phoenix_int/aserver/PHXVariableInfo) objects

### removeAllVariables

```java theme={null}
public void removeAllVariables()
```

removes all variables from the group

### removeAllGroups

```java theme={null}
public void removeAllGroups()
```

remove all groups from the group

### removeVariable

```java theme={null}
public void removeVariable(PHXVariableInfo varInfo)
```

removes a variable

**Parameters:**

* `varInfo`- the variable structure to remove

### toString

```java theme={null}
public java.lang.String toString()
```

Converts this to a string

**Overrides:**

* `toString` in class `java.lang.Object`

**Returns:**

* the string "Group: " with the name of the group appended.
