ariba.util.core
Class Feature<T>

java.lang.Object
  extended by ariba.util.core.Feature<T>

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

Represents a feature or capability in the system and can answer the question of whether the feature is enabled in an instance of a given context, which is specified by the generic T parameter.


Constructor Summary
Feature(java.lang.String featureName, Predicate<T> predicate)
           
 
Method Summary
 java.lang.String featureName()
          Return name of feature
 Predicate<T> getPredicate()
          The predicate to evaluate to determine if the feature is enabled.
 boolean isEnabled(T t)
          Use information from T and the implementation of the predicate to calculate whether the feature is enabled.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Feature

public Feature(java.lang.String featureName,
               Predicate<T> predicate)
Method Detail

featureName

public final java.lang.String featureName()
Return name of feature

Returns:

isEnabled

public boolean isEnabled(T t)
Use information from T and the implementation of the predicate to calculate whether the feature is enabled.

Parameters:
t -
Returns:
boolean true if feature is enabled

getPredicate

public Predicate<T> getPredicate()
The predicate to evaluate to determine if the feature is enabled.

Returns:
the predicate


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.