org.glassfish.jersey.model.internal
Class FeatureBag.Builder

java.lang.Object
  extended by org.glassfish.jersey.model.internal.FeatureBag.Builder
Enclosing class:
FeatureBag

public static final class FeatureBag.Builder
extends Object

Feature bag builder.


Constructor Summary
FeatureBag.Builder()
          Creates a new FeatureBag instance.
FeatureBag.Builder(FeatureBag.Builder other)
          Copy constructor.
FeatureBag.Builder(FeatureBag other)
          Copy constructor.
 
Method Summary
 boolean add(Class<? extends Feature> featureClass)
          Adds a feature class to the list of features.
 boolean add(Feature feature)
          Adds a feature instance to the list of features.
 FeatureBag build()
          Build a feature bag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureBag.Builder

public FeatureBag.Builder()
Creates a new FeatureBag instance.


FeatureBag.Builder

public FeatureBag.Builder(FeatureBag.Builder other)
Copy constructor.

Parameters:
other - instance of FeatureBag.Builder to copy data from.

FeatureBag.Builder

public FeatureBag.Builder(FeatureBag other)
Copy constructor.

Parameters:
other - instance of FeatureBag.Builder to copy data from.
Method Detail

add

public boolean add(Class<? extends Feature> featureClass)
Adds a feature class to the list of features.

Parameters:
featureClass - feature class to be enabled.
Returns:
true if the feature has been successfully added to the list of features, false if a feature (class/instance) of this class is already present in this bag.

add

public boolean add(Feature feature)
Adds a feature instance to the list of features.

Parameters:
feature - feature instance to be enabled.
Returns:
true if the feature class has been successfully added to the list of features, false if a feature instance is already present in this bag.

build

public FeatureBag build()
Build a feature bag.

Returns:
new feature bag initialized with the content of the feature bag builder.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.