public class CategoricalData extends Object implements Cloneable, Serializable
Constructor and Description |
---|
CategoricalData(int n) |
Modifier and Type | Method and Description |
---|---|
CategoricalData |
clone() |
static CategoricalData[] |
copyOf(CategoricalData[] orig) |
String |
getCategoryName() |
int |
getNumOfCategories() |
String |
getOptionName(int i) |
boolean |
isValidCategory(int i)
Returns true if the given input is a valid category index for this object.
|
void |
setCategoryName(String categoryName) |
boolean |
setOptionName(String name,
int i)
Sets the name of one of the value options.
|
public CategoricalData(int n)
n
- the number of categoriespublic int getNumOfCategories()
public boolean isValidCategory(int i)
i
- the index for a category in this objecttrue
if it was a valid category, false
otherwise.public String getOptionName(int i)
public String getCategoryName()
public void setCategoryName(String categoryName)
public boolean setOptionName(String name, int i)
name
- the name to givei
- the ith index to set.public CategoricalData clone()
public static CategoricalData[] copyOf(CategoricalData[] orig)
Copyright © 2017. All rights reserved.