com.amazon.carbonado.qe
Class QueryHints

java.lang.Object
  extended by com.amazon.carbonado.qe.QueryHints
All Implemented Interfaces:
Serializable

public class QueryHints
extends Object
implements Serializable

An immutable map of query hints.

Since:
1.2
Author:
Brian S O'Neill
See Also:
QueryHint, Serialized Form

Method Summary
 boolean contains(QueryHint hint)
          Returns false if hint is not provided.
static QueryHints emptyHints()
           
 boolean equals(Object obj)
           
 Object get(QueryHint hint)
          Returns null if hint is not provided.
 int hashCode()
           
 boolean isEmpty()
           
 String toString()
           
 QueryHints with(QueryHint hint)
          Returns a new QueryHints object with the given hint.
 QueryHints with(QueryHint hint, Object value)
          Returns a new QueryHints object with the given hint and value.
 QueryHints without(QueryHint hint)
          Returns a new QueryHints object without the given hint.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

emptyHints

public static QueryHints emptyHints()

with

public QueryHints with(QueryHint hint)
Returns a new QueryHints object with the given hint. The associated value is the hint object itself.

Throws:
IllegalArgumentException - if hint is null

with

public QueryHints with(QueryHint hint,
                       Object value)
Returns a new QueryHints object with the given hint and value.

Throws:
IllegalArgumentException - if hint or value is null

without

public QueryHints without(QueryHint hint)
Returns a new QueryHints object without the given hint.


contains

public boolean contains(QueryHint hint)
Returns false if hint is not provided.


get

public Object get(QueryHint hint)
Returns null if hint is not provided.


isEmpty

public boolean isEmpty()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.