public class AttributeLocator extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<AttributeLocator>
Attribute#RELATIONAL
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected int[] |
m_AllowedIndices
the attribute indices that may be inspected
|
protected java.util.Vector |
m_Attributes
contains the attribute locations, either true or false Boolean objects
|
protected Instances |
m_Data
the referenced data
|
protected int[] |
m_Indices
the indices
|
protected int[] |
m_LocatorIndices
the indices of locator objects
|
protected java.util.Vector |
m_Locators
contains the locator locations, either null or a AttributeLocator reference
|
protected int |
m_Type
the type of the attribute
|
Constructor and Description |
---|
AttributeLocator(Instances data,
int type)
Initializes the AttributeLocator with the given data for the specified
type of attribute.
|
AttributeLocator(Instances data,
int type,
int[] indices)
initializes the AttributeLocator with the given data for the specified
type of attribute.
|
AttributeLocator(Instances data,
int type,
int fromIndex,
int toIndex)
Initializes the AttributeLocator with the given data for the specified
type of attribute.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AttributeLocator o)
Compares this object with the specified object for order.
|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.
|
protected int[] |
find(boolean findAtts)
returns the indices of the searched-for attributes (if TRUE) or the indices
of AttributeLocator objects (if FALSE)
|
int |
getActualIndex(int index)
returns actual index in the Instances object.
|
int[] |
getAllowedIndices()
returns the indices that are allowed to check for the attribute type
|
int[] |
getAttributeIndices()
Returns the indices of the attributes.
|
Instances |
getData()
returns the underlying data
|
AttributeLocator |
getLocator(int index)
Returns the AttributeLocator at the given index.
|
int[] |
getLocatorIndices()
Returns the indices of the AttributeLocator objects.
|
int |
getType()
returns the type of attribute that is located
|
protected void |
initialize(Instances data,
int type,
int[] indices)
initializes the AttributeLocator
|
protected void |
locate()
sets up the structure
|
java.lang.String |
toString()
returns a string representation of this object
|
protected int[] m_AllowedIndices
protected java.util.Vector m_Attributes
protected java.util.Vector m_Locators
protected int m_Type
protected Instances m_Data
protected int[] m_Indices
protected int[] m_LocatorIndices
public AttributeLocator(Instances data, int type)
data
- the data to work ontype
- the type of attribute to locatepublic AttributeLocator(Instances data, int type, int fromIndex, int toIndex)
data
- the data to work ontype
- the type of attribute to locatefromIndex
- the first index to inspect (including)toIndex
- the last index to check (including)public AttributeLocator(Instances data, int type, int[] indices)
data
- the data to work ontype
- the type of attribute to locateindices
- the attribute indices to checkprotected void initialize(Instances data, int type, int[] indices)
data
- the data to base the search for attributes ontype
- the type of attribute to look forindices
- the indices that are allowed to checkpublic int getType()
public int[] getAllowedIndices()
protected void locate()
public Instances getData()
protected int[] find(boolean findAtts)
findAtts
- if true the indices of attributes are located,
otherwise the ones of AttributeLocator objectspublic int getActualIndex(int index)
index
- the index in the m_AllowedIndices arraypublic int[] getAttributeIndices()
getActualIndex(int)
public int[] getLocatorIndices()
getActualIndex(int)
public AttributeLocator getLocator(int index)
index
- the index of the locator to retrievepublic int compareTo(AttributeLocator o)
compareTo
in interface java.lang.Comparable<AttributeLocator>
o
- the object to compare withpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the AttributeLocator to check for equalitypublic java.lang.String toString()
toString
in class java.lang.Object