com.basho.riak.client.http.request
Class RiakWalkSpec

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<com.basho.riak.client.http.request.RiakWalkSpecStep>
              extended by com.basho.riak.client.http.request.RiakWalkSpec
All Implemented Interfaces:
Serializable, Cloneable, Iterable<com.basho.riak.client.http.request.RiakWalkSpecStep>, Collection<com.basho.riak.client.http.request.RiakWalkSpecStep>, List<com.basho.riak.client.http.request.RiakWalkSpecStep>, RandomAccess

public class RiakWalkSpec
extends ArrayList<com.basho.riak.client.http.request.RiakWalkSpecStep>

Tool for building Riak/Jaywalker specs. Using this class to specify walk specs ensures that bucket and tag names will be properly URL-escaped.

Version:
0.1
Author:
Bryan Fink
See Also:
Serialized Form

Field Summary
static String WILDCARD
          The "don't care" signifier.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
RiakWalkSpec()
          Create an empty Riak walk spec.
 
Method Summary
 void addStep(String bucket, String tag)
          Append a step to this walk spec, and take the default option for the accumulate flag.
 void addStep(String bucket, String tag, boolean accumulateFlag)
          Append a step to this walk spec.
 void addStep(String bucket, String tag, String accumulateFlag)
          Append a step to this walk spec.
 String toString()
          Convert this walk step to a string.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

WILDCARD

public static final String WILDCARD
The "don't care" signifier. Pass this as the bucket, tag, or accumulate flag to select the default, or match-all option.

See Also:
Constant Field Values
Constructor Detail

RiakWalkSpec

public RiakWalkSpec()
Create an empty Riak walk spec.

Method Detail

addStep

public void addStep(String bucket,
                    String tag,
                    String accumulateFlag)
Append a step to this walk spec.

Parameters:
bucket - The bucket of the step, or the wildcard.
tag - The tag of the step, or the wildcard.
accumulateFlag - The string "1" to force this step to be accumulated in the results. "0" to force this step not to be accumulated. WILDCARD to accept the default accumulation setting ("yes" for the last step, "no" for all others).

addStep

public void addStep(String bucket,
                    String tag,
                    boolean accumulateFlag)
Append a step to this walk spec. Same as the other addStep function, but allows the use of a boolean instead of a string for the accumulateFlag parameter.


addStep

public void addStep(String bucket,
                    String tag)
Append a step to this walk spec, and take the default option for the accumulate flag.


toString

public String toString()
Convert this walk step to a string. All bucket and tag names will be URL-escaped in the return value.

Overrides:
toString in class AbstractCollection<com.basho.riak.client.http.request.RiakWalkSpecStep>


Copyright © 2012. All Rights Reserved.