public class Element extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable, RevisionHandler
Constructor and Description |
---|
Element()
Constructor
|
Element(int size)
Constructor accepting an initial size of the events Array as parameter.
|
Modifier and Type | Method and Description |
---|---|
Element |
clone()
Returns a deep clone of an Element.
|
boolean |
containsOverOneEvent()
Checks if an Element contains over one event.
|
void |
deleteEvent(java.lang.String position)
Deletes the first or last event of an Element.
|
boolean |
equals(java.lang.Object obj)
Checks if two Elements are equal.
|
int[] |
getEvents()
Returns the events Array of an Element.
|
static FastVector |
getOneElements(Instances instances)
Returns all events of the given data set as Elements containing a single
event.
|
java.lang.String |
getRevision()
Returns the revision string.
|
boolean |
isContainedBy(Instance instance)
Checks if an Element is contained by a given Instance.
|
boolean |
isEmpty()
Checks if the Element contains any events.
|
static Element |
merge(Element element1,
Element element2)
Merges two Elements into one.
|
java.lang.String |
toNominalString(Instances dataSet)
Returns a String representation of an Element where the numeric value
of each event/item is represented by its respective nominal value.
|
java.lang.String |
toString()
Returns a String representation of an Element.
|
public Element()
public Element(int size)
size
- the sizepublic static FastVector getOneElements(Instances instances)
instances
- the data setpublic static Element merge(Element element1, Element element2)
element1
- first Elementelement2
- second Elementpublic Element clone()
clone
in class java.lang.Object
public boolean containsOverOneEvent()
public void deleteEvent(java.lang.String position)
position
- the position of the event to be deleted (first or last)public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int[] getEvents()
public boolean isContainedBy(Instance instance)
instance
- the given Instancepublic boolean isEmpty()
public java.lang.String toNominalString(Instances dataSet)
dataSet
- the corresponding data set containing the header informationpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler