org.joda.time
Class MockPartial

java.lang.Object
  extended by org.joda.time.MockPartial
All Implemented Interfaces:
Comparable<ReadablePartial>, ReadablePartial

public class MockPartial
extends Object
implements ReadablePartial

A basic mock testing class for a PartialInstant that doesn't extend AbstractPartialInstant.

Author:
Stephen Colebourne

Field Summary
static ReadablePartial EMPTY_INSTANCE
           
 
Constructor Summary
MockPartial()
           
 
Method Summary
 int compareTo(ReadablePartial partial)
           
 int get(DateTimeFieldType field)
           
 Chronology getChronology()
           
 DateTimeField getField(int index)
           
 DateTimeField[] getFields()
           
 DateTimeFieldType getFieldType(int index)
           
 int getValue(int index)
           
 int[] getValues()
           
 boolean isSupported(DateTimeFieldType field)
           
 int size()
           
 DateTime toDateTime(DateTimeZone zone)
           
 DateTime toDateTime(ReadableInstant base)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.joda.time.ReadablePartial
equals, hashCode, toString
 

Field Detail

EMPTY_INSTANCE

public static final ReadablePartial EMPTY_INSTANCE
Constructor Detail

MockPartial

public MockPartial()
Method Detail

getChronology

public Chronology getChronology()
Specified by:
getChronology in interface ReadablePartial

size

public int size()
Specified by:
size in interface ReadablePartial

getFieldType

public DateTimeFieldType getFieldType(int index)
Specified by:
getFieldType in interface ReadablePartial

getField

public DateTimeField getField(int index)
Specified by:
getField in interface ReadablePartial

getValue

public int getValue(int index)
Specified by:
getValue in interface ReadablePartial

get

public int get(DateTimeFieldType field)
Specified by:
get in interface ReadablePartial

isSupported

public boolean isSupported(DateTimeFieldType field)
Specified by:
isSupported in interface ReadablePartial

toDateTime

public DateTime toDateTime(DateTimeZone zone)

toDateTime

public DateTime toDateTime(ReadableInstant base)
Specified by:
toDateTime in interface ReadablePartial

getFields

public DateTimeField[] getFields()

getValues

public int[] getValues()

compareTo

public int compareTo(ReadablePartial partial)
Specified by:
compareTo in interface Comparable<ReadablePartial>


Copyright © 2002-2013 Joda.org. All Rights Reserved.