owltools.flex
Class FlexLine

java.lang.Object
  extended by owltools.flex.FlexLine
All Implemented Interfaces:
Iterable<String>

public class FlexLine
extends Object
implements Iterable<String>

Workalike for a singleton line in a Solr document.


Field Summary
protected  String field
           
protected  List<String> value
           
 
Constructor Summary
FlexLine(String in_field, ArrayList<String> in_values)
          List init.
FlexLine(String in_field, String in_value)
          Singleton init.
 
Method Summary
 String field()
          Return the field name.
 boolean isMulti()
          Return whether or not the line has a single value or multiple values.
 boolean isSingle()
          Return whether or not the line has a single value or multiple values.
 Iterator<String> iterator()
           
 String value()
          Return the first/only value.
 List<String> values()
          Return all the values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

field

protected String field

value

protected List<String> value
Constructor Detail

FlexLine

public FlexLine(String in_field,
                String in_value)
Singleton init.

Parameters:
in_field -
in_value -

FlexLine

public FlexLine(String in_field,
                ArrayList<String> in_values)
List init.

Parameters:
in_field -
in_values -
Method Detail

field

public String field()
Return the field name.

Returns:
field name

values

public List<String> values()
Return all the values.

Returns:
values

isSingle

public boolean isSingle()
Return whether or not the line has a single value or multiple values.

Returns:
boolean

isMulti

public boolean isMulti()
Return whether or not the line has a single value or multiple values.

Returns:
boolean

value

public String value()
Return the first/only value.

Returns:
boolean

iterator

public Iterator<String> iterator()
Specified by:
iterator in interface Iterable<String>


Copyright © 2010-2013. All Rights Reserved.