Java Code Examples for org.joda.time.DurationFieldType#millis()
The following examples show how to use
org.joda.time.DurationFieldType#millis() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestScaledDurationField.java From astor with GNU General Public License v2.0 | 5 votes |
public void test_equals() { assertEquals(true, iField.equals(iField)); assertEquals(false, iField.equals(ISOChronology.getInstance().minutes())); DurationField dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.minutes(), 2); assertEquals(false, iField.equals(dummy)); dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.minutes(), 90); assertEquals(true, iField.equals(dummy)); dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.millis(), 90); assertEquals(false, iField.equals(dummy)); assertEquals(false, iField.equals("")); assertEquals(false, iField.equals(null)); }
Example 2
Source File: TestScaledDurationField.java From astor with GNU General Public License v2.0 | 5 votes |
public void test_hashCode() { assertEquals(iField.hashCode(), iField.hashCode()); assertEquals(false, iField.hashCode() == ISOChronology.getInstance().minutes().hashCode()); DurationField dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.minutes(), 2); assertEquals(false, iField.hashCode() == dummy.hashCode()); dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.minutes(), 90); assertEquals(true, iField.hashCode() == dummy.hashCode()); dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.millis(), 90); assertEquals(false, iField.hashCode() == dummy.hashCode()); }
Example 3
Source File: TestPreciseDurationField.java From astor with GNU General Public License v2.0 | 5 votes |
public void test_equals() { assertEquals(true, iField.equals(iField)); assertEquals(false, iField.equals(ISOChronology.getInstance().minutes())); DurationField dummy = new PreciseDurationField(DurationFieldType.seconds(), 0); assertEquals(false, iField.equals(dummy)); dummy = new PreciseDurationField(DurationFieldType.seconds(), 1000); assertEquals(true, iField.equals(dummy)); dummy = new PreciseDurationField(DurationFieldType.millis(), 1000); assertEquals(false, iField.equals(dummy)); assertEquals(false, iField.equals("")); assertEquals(false, iField.equals(null)); }
Example 4
Source File: TestPreciseDurationField.java From astor with GNU General Public License v2.0 | 5 votes |
public void test_hashCode() { assertEquals(true, iField.hashCode() == iField.hashCode()); assertEquals(false, iField.hashCode() == ISOChronology.getInstance().minutes().hashCode()); DurationField dummy = new PreciseDurationField(DurationFieldType.seconds(), 0); assertEquals(false, iField.hashCode() == dummy.hashCode()); dummy = new PreciseDurationField(DurationFieldType.seconds(), 1000); assertEquals(true, iField.hashCode() == dummy.hashCode()); dummy = new PreciseDurationField(DurationFieldType.millis(), 1000); assertEquals(false, iField.hashCode() == dummy.hashCode()); }
Example 5
Source File: TestScaledDurationField.java From astor with GNU General Public License v2.0 | 5 votes |
public void test_equals() { assertEquals(true, iField.equals(iField)); assertEquals(false, iField.equals(ISOChronology.getInstance().minutes())); DurationField dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.minutes(), 2); assertEquals(false, iField.equals(dummy)); dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.minutes(), 90); assertEquals(true, iField.equals(dummy)); dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.millis(), 90); assertEquals(false, iField.equals(dummy)); assertEquals(false, iField.equals("")); assertEquals(false, iField.equals(null)); }
Example 6
Source File: TestScaledDurationField.java From astor with GNU General Public License v2.0 | 5 votes |
public void test_hashCode() { assertEquals(iField.hashCode(), iField.hashCode()); assertEquals(false, iField.hashCode() == ISOChronology.getInstance().minutes().hashCode()); DurationField dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.minutes(), 2); assertEquals(false, iField.hashCode() == dummy.hashCode()); dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.minutes(), 90); assertEquals(true, iField.hashCode() == dummy.hashCode()); dummy = new ScaledDurationField(MillisDurationField.INSTANCE, DurationFieldType.millis(), 90); assertEquals(false, iField.hashCode() == dummy.hashCode()); }
Example 7
Source File: TestPreciseDurationField.java From astor with GNU General Public License v2.0 | 5 votes |
public void test_equals() { assertEquals(true, iField.equals(iField)); assertEquals(false, iField.equals(ISOChronology.getInstance().minutes())); DurationField dummy = new PreciseDurationField(DurationFieldType.seconds(), 0); assertEquals(false, iField.equals(dummy)); dummy = new PreciseDurationField(DurationFieldType.seconds(), 1000); assertEquals(true, iField.equals(dummy)); dummy = new PreciseDurationField(DurationFieldType.millis(), 1000); assertEquals(false, iField.equals(dummy)); assertEquals(false, iField.equals("")); assertEquals(false, iField.equals(null)); }
Example 8
Source File: TestPreciseDurationField.java From astor with GNU General Public License v2.0 | 5 votes |
public void test_hashCode() { assertEquals(true, iField.hashCode() == iField.hashCode()); assertEquals(false, iField.hashCode() == ISOChronology.getInstance().minutes().hashCode()); DurationField dummy = new PreciseDurationField(DurationFieldType.seconds(), 0); assertEquals(false, iField.hashCode() == dummy.hashCode()); dummy = new PreciseDurationField(DurationFieldType.seconds(), 1000); assertEquals(true, iField.hashCode() == dummy.hashCode()); dummy = new PreciseDurationField(DurationFieldType.millis(), 1000); assertEquals(false, iField.hashCode() == dummy.hashCode()); }
Example 9
Source File: MillisDurationField.java From astor with GNU General Public License v2.0 | 4 votes |
public DurationFieldType getType() { return DurationFieldType.millis(); }
Example 10
Source File: MillisDurationField.java From astor with GNU General Public License v2.0 | 4 votes |
public DurationFieldType getType() { return DurationFieldType.millis(); }