|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.taverna.t2.partition.Partition<ItemType,PartitionValueType,ChildPartitionValueType>
ItemType - all items in the underlying set of which this is a subset are
instances of this type or can be cast to it according to
conventional java language rules.PartitionValueType - the partition value type used by the parent partition algorithm to
create this partition object. As an example, if this partition
object represented all those entries with a particular host
institution this would be a String or possibly URL.ChildPartitionValueType - the partition value type used by this partition's partition
algorithm to create sub-partitions, it's used in the signature
here because ordering of children is done based on these values.
Any child partition will have a getPartitionValue return type
cast-able to this type.public class Partition<ItemType extends java.lang.Comparable,PartitionValueType,ChildPartitionValueType>
A partition represents a set of items which can be exclusively classified into one or more distinct subsets along with the algorithm to perform this subset operation.
| Method Summary | |
|---|---|
java.util.Comparator<ChildPartitionValueType> |
getChildPartitionOrder()
Sub-partitions of this partition are ordered based on a comparator over the child partition value type. |
java.util.List<Partition<ItemType,ChildPartitionValueType,?>> |
getChildren()
Sub-partitions of this partition defined by the partition algorithm at index 0 of the list. |
int |
getItemCount()
Return the number of items below this node in the partition tree; in the case of leaf partitions this is the number of items in the member set, for non-leaf partitions it is the sum of the item count for all immediate child partitions. |
java.util.List<ItemType> |
getMembers()
If this is a leaf partition, defined as one with an empty list of partition algorithms, then this method returns the set of all items which have been classified as belonging to this leaf partition. |
Partition<ItemType,?,PartitionValueType> |
getParent()
Return the parent partition of which this is a sub-partition, or null if this is the root partition. |
java.util.List<PartitionAlgorithm<?>> |
getPartitionAlgorithms()
The list of partition algorithms applicable to this node (at index 0) and subsequent downstream sub-partitions of it. |
java.util.List<Partition<ItemType,?,?>> |
getPartitionPath()
Return a list of Partition objects from the root (at index 0) to this node at the final position in the list. |
PartitionValueType |
getPartitionValue()
The parent partition created this partition based on a particular value of a property of the members of the sub-partition. |
void |
setChildPartitionOrder(java.util.Comparator<ChildPartitionValueType> order)
Set a comparator for child partition ordering - if the supplied comparator is different to the current one this will also trigger a re-order of all child partitions and corresponding events in the root partition's tree view. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public int getItemCount()
public java.util.Comparator<ChildPartitionValueType> getChildPartitionOrder()
public void setChildPartitionOrder(java.util.Comparator<ChildPartitionValueType> order)
order - a new comparator to order child partitionspublic Partition<ItemType,?,PartitionValueType> getParent()
public PartitionValueType getPartitionValue()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.List<Partition<ItemType,?,?>> getPartitionPath()
public final java.util.List<ItemType> getMembers()
public final java.util.List<PartitionAlgorithm<?>> getPartitionAlgorithms()
public final java.util.List<Partition<ItemType,ChildPartitionValueType,?>> getChildren()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||