|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjgromacs.data.IndexSet
public class IndexSet
Objects of this class represent a single index set
Constructor Summary | |
---|---|
IndexSet()
Constructs a new IndexSet object |
|
IndexSet(java.util.ArrayList<java.lang.Integer> list)
Constructs a new IndexSet object and loads data from an ArrayList |
|
IndexSet(java.util.ArrayList<java.lang.Integer> list,
java.lang.String name)
Constructs a new IndexSet object of a given name and loads data from an ArrayList |
|
IndexSet(IndexSet set)
Constructs a new IndexSet object identical to a given IndexSet |
|
IndexSet(java.lang.String name)
Constructs a new IndexSet object of a given name |
|
IndexSet(java.util.TreeSet<java.lang.Integer> set)
Constructs a new IndexSet object and loads data from a TreeSet |
|
IndexSet(java.util.TreeSet<java.lang.Integer> set,
java.lang.String name)
Constructs a new IndexSet object of a given name and loads data from a TreeSet |
Method Summary | |
---|---|
void |
addIndex(int index)
Adds a new index to the index set |
java.lang.Object |
clone()
Returns an identical IndexSet object |
boolean |
equals(java.lang.Object other)
Returns true if this index sets is identical to another |
java.util.ArrayList<java.lang.Integer> |
getAsArrayList()
Returns index set as an ArrayList |
java.util.TreeSet<java.lang.Integer> |
getAsTreeSet()
Returns index set as a TreeSet |
java.lang.String |
getName()
Returns the name of index set |
int |
getNumberOfIndices()
Returns the number of indices in this index set |
int |
hashCode()
Returns hash code |
IndexSet |
intersect(IndexSet other)
Returns the intersection of this index set and another |
boolean |
isIndexIn(int index)
Returns true if the index set contains a given index |
void |
removeIndex(int index)
Removes an index from the index set |
void |
setName(java.lang.String name)
Sets the name of index set |
IndexSet |
subtract(IndexSet other)
Returns the subtraction of another index set from this index set |
java.lang.String |
toString()
Returns the String representation of index set |
java.lang.String |
toStringInfo()
Returns summary information about the index set |
IndexSet |
union(IndexSet other)
Returns the union of this index set and another |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IndexSet()
public IndexSet(java.lang.String name)
public IndexSet(java.util.ArrayList<java.lang.Integer> list)
public IndexSet(java.util.ArrayList<java.lang.Integer> list, java.lang.String name)
public IndexSet(java.util.TreeSet<java.lang.Integer> set)
public IndexSet(java.util.TreeSet<java.lang.Integer> set, java.lang.String name)
public IndexSet(IndexSet set)
Method Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
public java.util.TreeSet<java.lang.Integer> getAsTreeSet()
public java.util.ArrayList<java.lang.Integer> getAsArrayList()
public int getNumberOfIndices()
public boolean isIndexIn(int index)
public void addIndex(int index)
public void removeIndex(int index)
public IndexSet intersect(IndexSet other)
public IndexSet subtract(IndexSet other)
public IndexSet union(IndexSet other)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringInfo()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |