cascading.pattern.datafield
Class CategoricalDataField

java.lang.Object
  extended by cascading.pattern.datafield.DataField
      extended by cascading.pattern.datafield.CategoricalDataField
All Implemented Interfaces:
Serializable

public class CategoricalDataField
extends DataField

Class CategoricalDataField represent a field with a fixed set of possible values.

For example, if the field name is SIZE, it could have three possible categories, small, medium, and large.

Order of categories is retained so that indexes into the internal list of categories can be used to speed up some operations.

See Also:
Serialized Form

Field Summary
protected  List<String> categories
           
 
Fields inherited from class cascading.pattern.datafield.DataField
name, type
 
Constructor Summary
CategoricalDataField(CategoricalDataField dataField, String... categories)
           
CategoricalDataField(Fields fields, List<String> categories)
           
CategoricalDataField(Fields fields, String... categories)
           
CategoricalDataField(String name, Type type, List<String> categories)
           
CategoricalDataField(String name, Type type, String... categories)
           
 
Method Summary
 List<String> getCategories()
          Gets an unmodifiable list of the current categories.
 
Methods inherited from class cascading.pattern.datafield.DataField
getName, getType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

categories

protected List<String> categories
Constructor Detail

CategoricalDataField

public CategoricalDataField(CategoricalDataField dataField,
                            String... categories)

CategoricalDataField

public CategoricalDataField(Fields fields,
                            String... categories)

CategoricalDataField

public CategoricalDataField(Fields fields,
                            List<String> categories)

CategoricalDataField

public CategoricalDataField(String name,
                            Type type,
                            String... categories)

CategoricalDataField

public CategoricalDataField(String name,
                            Type type,
                            List<String> categories)
Method Detail

getCategories

public List<String> getCategories()
Gets an unmodifiable list of the current categories.

Returns:
the categories


Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.