com.mysema.query.group
Class QPair<K,V>

java.lang.Object
  extended by com.mysema.query.types.ExpressionBase<com.mysema.commons.lang.Pair<K,V>>
      extended by com.mysema.query.group.QPair<K,V>
Type Parameters:
K - Map key type
V - Map value type
All Implemented Interfaces:
Expression<com.mysema.commons.lang.Pair<K,V>>, FactoryExpression<com.mysema.commons.lang.Pair<K,V>>, Serializable

public final class QPair<K,V>
extends ExpressionBase<com.mysema.commons.lang.Pair<K,V>>
implements FactoryExpression<com.mysema.commons.lang.Pair<K,V>>

A pair of (Map) key and value

Author:
sasa
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.ExpressionBase
type
 
Constructor Summary
QPair(Expression<K> key, Expression<V> value)
           
 
Method Summary
<R,C> R
accept(Visitor<R,C> v, C context)
          Accept the visitor with the given context
static
<K,V> QPair<K,V>
create(Expression<K> key, Expression<V> value)
           
 boolean equals(Expression<?> keyExpr, Class<?> valueType)
           
 boolean equals(Expression<?> keyExpr, Expression<?> valueExpr)
           
 boolean equals(Object o)
           
 List<Expression<?>> getArgs()
          Get the invocation arguments
 int hashCode()
           
 com.mysema.commons.lang.Pair<K,V> newInstance(Object... args)
          Create a projection with the given arguments
 
Methods inherited from class com.mysema.query.types.ExpressionBase
getType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.mysema.query.types.Expression
getType
 

Constructor Detail

QPair

public QPair(Expression<K> key,
             Expression<V> value)
Method Detail

create

public static <K,V> QPair<K,V> create(Expression<K> key,
                                      Expression<V> value)

accept

public <R,C> R accept(Visitor<R,C> v,
                      C context)
Description copied from interface: Expression
Accept the visitor with the given context

Specified by:
accept in interface Expression<com.mysema.commons.lang.Pair<K,V>>
Type Parameters:
R - return type
C - context type
Parameters:
v - visitor
context - context of visit
Returns:

getArgs

public List<Expression<?>> getArgs()
Description copied from interface: FactoryExpression
Get the invocation arguments

Specified by:
getArgs in interface FactoryExpression<com.mysema.commons.lang.Pair<K,V>>
Returns:

equals

public boolean equals(Expression<?> keyExpr,
                      Expression<?> valueExpr)

equals

public boolean equals(Expression<?> keyExpr,
                      Class<?> valueType)

newInstance

public com.mysema.commons.lang.Pair<K,V> newInstance(Object... args)
Description copied from interface: FactoryExpression
Create a projection with the given arguments

Specified by:
newInstance in interface FactoryExpression<com.mysema.commons.lang.Pair<K,V>>
Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.