public class PhaseVarSet
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
java.lang.String |
fileName |
boolean |
isDirty |
java.lang.String |
name |
Constructor and Description |
---|
PhaseVarSet()
Default constructor
|
PhaseVarSet(PhaseVar[] vars)
Constructs a new set with specified variables
|
PhaseVarSet(java.lang.String nam)
Constructs a new set with specified name
|
PhaseVarSet(java.lang.String nam,
PhaseVar[] vars)
Constructs a new set with specified name and variables
|
Modifier and Type | Method and Description |
---|---|
void |
add(PhaseVar var) |
double[] |
getMeans()
Returns a vector with the means of all elements
|
int |
indexOfName(java.lang.String s)
Returns the index in the set of the variables with the specified name
|
java.lang.String |
newUniqueVarName(java.lang.String proposedName)
Builds a unique name for a variable from a proposed name
|
int |
numVars()
Returns the number of variables in the set
|
static PhaseVarSet |
open(java.lang.String fileName)
Reads a .sed file with the information of a set
|
static PhaseVarSet |
openTxt(java.lang.String fileName)
Reads a .txt file with the information of a set
|
void |
remove(PhaseVar var)
Remove the specified variable
|
int |
remove(java.lang.String varName)
Removes the variable with specified name
|
void |
save() |
void |
save(java.lang.String fileName) |
boolean |
saveTxt()
Saves the set information in a file
|
boolean |
saveTxt(java.lang.String fileName)
Saves the set information in a file
|
java.lang.String |
toString() |
PhaseVar |
varAt(int i)
Returns the variable at index i
|
public java.lang.String name
public java.lang.String fileName
public boolean isDirty
public PhaseVarSet()
public PhaseVarSet(java.lang.String nam)
nam
- Set namepublic PhaseVarSet(PhaseVar[] vars)
vars
- Set variablespublic PhaseVarSet(java.lang.String nam, PhaseVar[] vars)
nam
- Set namevars
- Set variablespublic java.lang.String newUniqueVarName(java.lang.String proposedName)
proposedName
- proposed namepublic void add(PhaseVar var)
var
- public PhaseVar varAt(int i)
i
- Index of the required variablespublic int indexOfName(java.lang.String s)
s
- Name to be evaluatedpublic int numVars()
public int remove(java.lang.String varName)
varName
- name of the variable to removepublic void remove(PhaseVar var)
var
- variable to removepublic double[] getMeans()
public static PhaseVarSet open(java.lang.String fileName) throws java.lang.Exception
fileName
- File with the variable setjava.lang.Exception
- IOExceptionpublic static PhaseVarSet openTxt(java.lang.String fileName) throws java.lang.Exception
fileName
- File with the variable setjava.lang.Exception
- IOExceptionpublic void save() throws java.io.IOException
java.io.IOException
public void save(java.lang.String fileName) throws java.io.IOException
fileName
- java.io.IOException
public boolean saveTxt() throws java.io.IOException
java.io.IOException
public boolean saveTxt(java.lang.String fileName) throws java.io.IOException
fileName
- File namejava.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object