jgromacs.data
Class IndexSetList

java.lang.Object
  extended by jgromacs.data.IndexSetList
All Implemented Interfaces:
java.lang.Cloneable

public class IndexSetList
extends java.lang.Object
implements java.lang.Cloneable

Objects of this class represent a list of index sets


Constructor Summary
IndexSetList()
          Constructs a new IndexSetList object
 
Method Summary
 void addIndexSet(IndexSet set)
          Adds a new index set to the list
 void addIndexSet(IndexSet set, java.lang.String name)
          Adds a new index set of given name to the list
 java.lang.Object clone()
          Returns an identical IndexSetList object
 boolean equals(java.lang.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
 java.util.ArrayList<IndexSet> getAsAnArrayList()
          Returns index set list as an ArrayList object
 IndexSet getIndexSet(int i)
          Returns the index set of given index
 IndexSet getIndexSet(java.lang.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(java.lang.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(IndexSet set)
          Removes the given index set from the list
 void removeIndexSet(int i)
          Removes index set of given index from the list
 void setIndexSet(int i, IndexSet set)
          Replaces index set of given index with a new index set
 java.lang.String toString()
          Returns the String representation of index set list
 java.lang.String toStringInfo()
          Returns summary information about the index set list
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexSetList

public IndexSetList()
Constructs a new IndexSetList object

Method Detail

getAsAnArrayList

public java.util.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(java.lang.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(java.lang.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,
                        java.lang.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 java.lang.String toString()
Returns the String representation of index set list

Overrides:
toString in class java.lang.Object
Returns:
String representation

toStringInfo

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

Returns:
summary information

clone

public java.lang.Object clone()
Returns an identical IndexSetList object

Overrides:
clone in class java.lang.Object
Returns:
clone of the index set list

equals

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

Overrides:
equals in class java.lang.Object
Parameters:
other - the other index set list

hashCode

public int hashCode()
Returns hash code

Overrides:
hashCode in class java.lang.Object