org.mindswap.pellet.utils
Class PartialOrderBuilder<T>

java.lang.Object
  extended by org.mindswap.pellet.utils.PartialOrderBuilder<T>

public class PartialOrderBuilder<T>
extends java.lang.Object

Title: Partial Order Builder

Description:

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
Mike Smith

Constructor Summary
PartialOrderBuilder()
          Deprecated. Use {PartialOrderBuilder(Taxonomy, PartialOrderComparator) instead
PartialOrderBuilder(Taxonomy<T> taxonomy, PartialOrderComparator<T> comparator)
          Initialize the builder with given taxonomy and comparator.
 
Method Summary
 void add(T toAdd)
          Add a new element to the partial order of this builder with its comparator.
 void addAll(java.util.Collection<? extends T> elements)
          Adds a collection of elements to the partial order.
static
<T> Taxonomy<T>
build(java.util.Collection<? extends T> elements, PartialOrderComparator<T> comparator)
           
static
<T> Taxonomy<T>
build(java.util.Collection<? extends T> elements, PartialOrderComparator<T> comparator, T top, T bottom)
           
 PartialOrderComparator<T> getComparator()
           
static
<T> Taxonomy<T>
getPartialOrder(java.util.Collection<T> elements, PartialOrderComparator<T> comparator)
          Deprecated. Use build(Collection, PartialOrderComparator) instead
 Taxonomy<T> getTaxonomy()
           
 void setComparator(PartialOrderComparator<T> comparator)
           
 void setTaxonomy(Taxonomy<T> taxonomy)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartialOrderBuilder

public PartialOrderBuilder()
Deprecated. Use {PartialOrderBuilder(Taxonomy, PartialOrderComparator) instead

Initialize the builder with no taxonomy or comparator.


PartialOrderBuilder

public PartialOrderBuilder(Taxonomy<T> taxonomy,
                           PartialOrderComparator<T> comparator)
Initialize the builder with given taxonomy and comparator.

Method Detail

build

public static <T> Taxonomy<T> build(java.util.Collection<? extends T> elements,
                                    PartialOrderComparator<T> comparator)

build

public static <T> Taxonomy<T> build(java.util.Collection<? extends T> elements,
                                    PartialOrderComparator<T> comparator,
                                    T top,
                                    T bottom)

add

public void add(T toAdd)
Add a new element to the partial order of this builder with its comparator.

Parameters:
toAdd - the element to be added

addAll

public void addAll(java.util.Collection<? extends T> elements)
Adds a collection of elements to the partial order.

Parameters:
elements - new elements to add

getComparator

public PartialOrderComparator<T> getComparator()

getPartialOrder

public static <T> Taxonomy<T> getPartialOrder(java.util.Collection<T> elements,
                                              PartialOrderComparator<T> comparator)
Deprecated. Use build(Collection, PartialOrderComparator) instead


getTaxonomy

public Taxonomy<T> getTaxonomy()

setComparator

public void setComparator(PartialOrderComparator<T> comparator)

setTaxonomy

public void setTaxonomy(Taxonomy<T> taxonomy)


Copyright © 2004 Evren Sirin. All Rights Reserved.