org.ops4j.pax.coin.service.internal.provider
Class ComparatorBasedConfigSelector

java.lang.Object
  extended by org.ops4j.pax.coin.service.internal.provider.ComparatorBasedConfigSelector
All Implemented Interfaces:
ConfigSelector

public class ComparatorBasedConfigSelector
extends Object
implements ConfigSelector

A configuration selector that selects as active configuration the highest configuration by sorting the configurations using the provided comparators.

Since:
0.3.0, March 02, 2008
Author:
Alin Dreghiciu

Method Summary
 ConfigGroup selectFrom(ConfigGroup... configGroups)
          Sorts the array using the comparator and returns the highest one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

selectFrom

public ConfigGroup selectFrom(ConfigGroup... configGroups)
Sorts the array using the comparator and returns the highest one.

Specified by:
selectFrom in interface ConfigSelector
Parameters:
configGroups - array of configuration groups; cannot be null or empty
Returns:
active configuration; cannot be null
See Also:
ConfigSelector.selectFrom(org.ops4j.pax.coin.spi.ConfigGroup[])


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.