Package org.apache.storm.tuple
Class Fields
java.lang.Object
org.apache.storm.tuple.Fields
- All Implemented Interfaces:
- Serializable,- Iterable<String>
Collection of unique named fields using in an ITuple.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanCheck contains.booleanintfieldIndex(String field) Returns the position of the specified named field.get(int index) Gets the field at position index in the collection.inthashCode()iterator()Select values out of tuple given a Fields selector Note that this function can throw a NullPointerException if the fields in selector are not found in the index.intsize()Returns the number of fields in this collection.toList()toString()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Constructor Details- 
Fields
- 
Fields
 
- 
- 
Method Details- 
selectSelect values out of tuple given a Fields selector Note that this function can throw a NullPointerException if the fields in selector are not found in the index.- Parameters:
- selector- Fields to select
- tuple- tuple to select from
 
- 
toList
- 
sizepublic int size()Returns the number of fields in this collection.
- 
getGets the field at position index in the collection.- Parameters:
- index- index of the field to return
- Throws:
- IndexOutOfBoundsException- - if the index is out of range (index < 0 || index >= size())
 
- 
iterator
- 
fieldIndexReturns the position of the specified named field.- Parameters:
- field- Named field to evaluate
- Throws:
- IllegalArgumentException- - if field does not exist
 
- 
containsCheck contains.- Returns:
- true if this contains the specified name of the field.
 
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
 
-