org.rhq.enterprise.server.resource.disambiguation
Class ReportPartitions<T>

java.lang.Object
  extended by org.rhq.enterprise.server.resource.disambiguation.ReportPartitions<T>
Type Parameters:
T - the type of the original instances the are being disambiguated.

public class ReportPartitions<T>
extends Object

This class partitions the reports inserted into it by chunking them up into sublists containing mutually ambiguous reports. The ambiguity is determined using a DisambiguationPolicy.

Author:
Lukas Krejci

Constructor Summary
ReportPartitions(DisambiguationPolicy disambiguationPolicy)
          Constructs a new instance with no partitions in it.
ReportPartitions(DisambiguationPolicy disambiguationPolicy, List<List<MutableDisambiguationReport<T>>> partitions)
           
ReportPartitions(DisambiguationPolicy disambiguationPolicy, ReportPartitions<T> other)
           
 
Method Summary
 List<List<MutableDisambiguationReport<T>>> getAllPartitions()
           
 List<List<MutableDisambiguationReport<T>>> getAmbiguousPartitions()
           
 DisambiguationPolicy getDisambiguationPolicy()
           
 List<List<MutableDisambiguationReport<T>>> getUniquePartitions()
           
 boolean isPartitionsUnique()
           
 void put(MutableDisambiguationReport<T> value)
           
 void putAll(List<MutableDisambiguationReport<T>> values)
           
 void putAll(ReportPartitions<T> other)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReportPartitions

public ReportPartitions(DisambiguationPolicy disambiguationPolicy)
Constructs a new instance with no partitions in it.

Parameters:
disambiguationPolicy - the policy that decides if reports are ambiguous.

ReportPartitions

public ReportPartitions(DisambiguationPolicy disambiguationPolicy,
                        ReportPartitions<T> other)

ReportPartitions

public ReportPartitions(DisambiguationPolicy disambiguationPolicy,
                        List<List<MutableDisambiguationReport<T>>> partitions)
Method Detail

getDisambiguationPolicy

public DisambiguationPolicy getDisambiguationPolicy()

getAmbiguousPartitions

public List<List<MutableDisambiguationReport<T>>> getAmbiguousPartitions()

getUniquePartitions

public List<List<MutableDisambiguationReport<T>>> getUniquePartitions()

getAllPartitions

public List<List<MutableDisambiguationReport<T>>> getAllPartitions()

put

public void put(MutableDisambiguationReport<T> value)

putAll

public void putAll(List<MutableDisambiguationReport<T>> values)

putAll

public void putAll(ReportPartitions<T> other)

isPartitionsUnique

public boolean isPartitionsUnique()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.