org.glassfish.jersey.internal.util.collection
Class ClassTypePair

java.lang.Object
  extended by org.glassfish.jersey.internal.util.collection.ClassTypePair
All Implemented Interfaces:
Pair<Class<?>,Type>

public final class ClassTypePair
extends Object
implements Pair<Class<?>,Type>

A pair of raw class and the related type.

Author:
Marek Potociar (marek.potociar at oracle.com)

Method Summary
 Class<?> left()
          Left-hand instance in the Pair.
static ClassTypePair of(Class<?> rawClass)
          Create new type-class pair for a non-generic class.
static ClassTypePair of(Class<?> rawClass, Type type)
          Create new type-class pair.
 Class<?> rawClass()
          Get the raw class of the type.
 Type right()
          Right-hand instance in the Pair.
 Type type()
          Get the actual type behind the raw class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

left

public Class<?> left()
Description copied from interface: Pair
Left-hand instance in the Pair.

Specified by:
left in interface Pair<Class<?>,Type>
Returns:
left-hand instance in the Pair

right

public Type right()
Description copied from interface: Pair
Right-hand instance in the Pair.

Specified by:
right in interface Pair<Class<?>,Type>
Returns:
right-hand instance in the Pair

rawClass

public Class<?> rawClass()
Get the raw class of the type.

Returns:
raw class of the type.

type

public Type type()
Get the actual type behind the raw class.

Returns:
the actual type behind the raw class.

of

public static ClassTypePair of(Class<?> rawClass)
Create new type-class pair for a non-generic class.

Parameters:
rawClass - (raw) class representing the non-generic type.
Returns:
new non-generic type-class pair.

of

public static ClassTypePair of(Class<?> rawClass,
                               Type type)
Create new type-class pair.

Parameters:
rawClass - raw class representing the type.
type - type behind the class.
Returns:
new type-class pair.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.