Package jgromacs.data

# Class IndexSetList

java.lang.Object
jgromacs.data.IndexSetList

All Implemented Interfaces:
  `Cloneable`

public class IndexSetList extends Object implements Cloneable
Objects of this class represent a list of index sets

## Constructor Summary

Constructors
Constructor
Description
`IndexSetList()`
Constructs a new IndexSetList object

## Method Summary

Modifier and Type
Method
Description
`void`
`addIndexSet(IndexSet set)`
Adds a new index set to the list
`void`
`addIndexSet(IndexSet set, String name)`
Adds a new index set of given name to the list
`Object`
`clone()`
Returns an identical IndexSetList object
`boolean`
`equals(Object other)`
Returns true if the two index set lists are identical
`IndexSet`
`fuseIntoOneIndexSet()`
Returns the union of all index sets as a single index set
`ArrayList<IndexSet>`
`getAsAnArrayList()`
Returns index set list as an ArrayList object
`IndexSet`
`getIndexSet(int i)`
Returns the index set of given index
`IndexSet`
`getIndexSet(String name)`
Returns the index set of given name
`int`
`getNumberOfAtomsInIndexSet(int i)`
Returns the number of atoms in the index set of given index
`int`
`getNumberOfAtomsInIndexSet(String name)`
Returns the number of atoms in the index set of given name
`int`
`getNumberOfIndexSets()`
Returns the number of index sets in the list
`int`
`hashCode()`
Returns hash code
`void`
`removeIndexSet(int i)`
Removes index set of given index from the list
`void`
`removeIndexSet(IndexSet set)`
Removes the given index set from the list
`void`
`setIndexSet(int i, IndexSet set)`
Replaces index set of given index with a new index set
`String`
`toString()`
Returns the String representation of index set list
`String`
`toStringInfo()`
Returns summary information about the index set list

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

`finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### IndexSetList

public IndexSetList()
Constructs a new IndexSetList object

## Method Details

### getAsAnArrayList

public ArrayList<IndexSet> getAsAnArrayList()
Returns index set list as an ArrayList object

Returns:
  index set list as an ArrayList

### getNumberOfIndexSets

public int getNumberOfIndexSets()
Returns the number of index sets in the list

Returns:
  number of index sets

### getIndexSet

public IndexSet getIndexSet(int i)
Returns the index set of given index

Parameters:
  `i` - index of index set
Returns:
  index set of given index

### getIndexSet

public IndexSet getIndexSet(String name)
Returns the index set of given name

Parameters:
  `name` - name of index set
Returns:
  index set of given name

### getNumberOfAtomsInIndexSet

public int getNumberOfAtomsInIndexSet(int i)
Returns the number of atoms in the index set of given index

Parameters:
  `i` - index of index set
Returns:
  number of atoms

### getNumberOfAtomsInIndexSet

public int getNumberOfAtomsInIndexSet(String name)
Returns the number of atoms in the index set of given name

Parameters:
  `name` - name of index set
Returns:
  number of atoms

### addIndexSet

public void addIndexSet(IndexSet set)
Adds a new index set to the list

Parameters:
  `set` - new index set

### addIndexSet

public void addIndexSet(IndexSet set, String name)
Adds a new index set of given name to the list

Parameters:
  `set` - new index set
  `name` - name of index set

### removeIndexSet

public void removeIndexSet(int i)
Removes index set of given index from the list

Parameters:
  `i` - index of index set to be removed

### removeIndexSet

public void removeIndexSet(IndexSet set)
Removes the given index set from the list

Parameters:
  `set` - index set to be removed

### setIndexSet

public void setIndexSet(int i, IndexSet set)
Replaces index set of given index with a new index set

Parameters:
  `i` - index of index set to be replaced
  `set` - new index set

### fuseIntoOneIndexSet

public IndexSet fuseIntoOneIndexSet()
Returns the union of all index sets as a single index set

Returns:
  union of index sets

### toString

public String toString()
Returns the String representation of index set list

Overrides:
  `toString` in class `Object`
Returns:
  String representation

### toStringInfo

public String toStringInfo()
Returns summary information about the index set list

Returns:
  summary information

### clone

public Object clone()
Returns an identical IndexSetList object

Overrides:
  `clone` in class `Object`
Returns:
  clone of the index set list

### equals

public boolean equals(Object other)
Returns true if the two index set lists are identical

Overrides:
  `equals` in class `Object`
Parameters:
  `other` - the other index set list

### hashCode

public int hashCode()
Returns hash code

Overrides:
  `hashCode` in class `Object`