Java Doc for Duration.java in  » Project-Management » OpenProj » com » projity » datatype » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Project Management » OpenProj » com.projity.datatype 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Number
      com.projity.datatype.Duration

All known Subclasses:   com.projity.datatype.Work,
Duration
public class Duration extends Number implements Comparable(Code)
Instead of creating a true Duration type, I use unused bits of the long which stores durations. The idea is that the algorithms will run faster because there is no object churn and fewer function calls.


Field Summary
final public static  longMAX_DURATION
    
final public static  DurationZERO
    
protected  booleanwork
    

Constructor Summary
public  Duration(long encodedMillis)
    

Method Summary
public static  longclear(long duration)
    
public  intcompareTo(Object arg0)
    
public  doubledoubleValue()
    
public  booleanequals(Object arg0)
    
public  floatfloatValue()
    
public  doublegetAsDays()
    
public  doublegetAsHours()
    
public static  intgetEffectiveType(long duration)
    
public  longgetEncodedMillis()
    
public static  longgetInstance(double value, int type)
    
public static  DurationgetInstanceFromDouble(Double doubleObject)
    
public static  floatgetPercentAsDecimal(long duration)
    
public static  intgetType(long duration)
    
public static  doublegetValue(long duration)
    
public static  booleanhasUnits(long duration)
    
public  intintValue()
    
public static  booleanisElapsed(long duration)
    
public static  booleanisEstimated(long duration)
    
public static  booleanisPercent(long duration)
    
public  booleanisWork()
    
public static  booleanisZero(long duration)
    
public  longlongValue()
    
public static  longmillis(long duration)
    
public static  longsetAsDays(long duration)
    
public static  longsetAsElapsed(long duration)
    
public static  longsetAsElapsedDays(long duration)
    
public static  longsetAsElapsedHours(long duration)
    
public static  longsetAsElapsedMinutes(long duration)
    
public static  longsetAsElapsedMonths(long duration)
    
public static  longsetAsElapsedPercent(long duration)
    
public static  longsetAsElapsedSeconds(long duration)
    
public static  longsetAsElapsedWeeks(long duration)
    
public static  longsetAsElapsedYears(long duration)
    
public static  longsetAsEstimated(long duration, boolean estimated)
    
public static  longsetAsHours(long duration)
    
public static  longsetAsMinutes(long duration)
    
public static  longsetAsMonths(long duration)
    
public static  longsetAsNonTemporal(long duration)
    
public static  longsetAsPercent(long duration)
    
public static  longsetAsSeconds(long duration)
    
public static  longsetAsTimeUnit(long duration, int type)
    
public static  longsetAsWeeks(long duration)
    
public static  longsetAsYears(long duration)
    
public  voidsetEncodedMillis(long encodedMillis)
    
public static  longsetPercentAsDecimal(long duration, float percentAsDecimal)
    
public  voidsetWork(boolean work)
    
public static  doubletimeUnitFactor(int type)
    
public  StringtoString()
    
public static  longuseTimeUnitOfInNone(long duration, long durationWithUnit)
    

Field Detail
MAX_DURATION
final public static long MAX_DURATION(Code)



ZERO
final public static Duration ZERO(Code)



work
protected boolean work(Code)




Constructor Detail
Duration
public Duration(long encodedMillis)(Code)




Method Detail
clear
public static long clear(long duration)(Code)



compareTo
public int compareTo(Object arg0)(Code)



doubleValue
public double doubleValue()(Code)



equals
public boolean equals(Object arg0)(Code)



floatValue
public float floatValue()(Code)



getAsDays
public double getAsDays()(Code)



getAsHours
public double getAsHours()(Code)



getEffectiveType
public static int getEffectiveType(long duration)(Code)



getEncodedMillis
public long getEncodedMillis()(Code)



getInstance
public static long getInstance(double value, int type)(Code)



getInstanceFromDouble
public static Duration getInstanceFromDouble(Double doubleObject)(Code)



getPercentAsDecimal
public static float getPercentAsDecimal(long duration)(Code)
Decimals are stored in lower order bytes as a float



getType
public static int getType(long duration)(Code)



getValue
public static double getValue(long duration)(Code)



hasUnits
public static boolean hasUnits(long duration)(Code)



intValue
public int intValue()(Code)



isElapsed
public static boolean isElapsed(long duration)(Code)



isEstimated
public static boolean isEstimated(long duration)(Code)



isPercent
public static boolean isPercent(long duration)(Code)



isWork
public boolean isWork()(Code)



isZero
public static boolean isZero(long duration)(Code)



longValue
public long longValue()(Code)



millis
public static long millis(long duration)(Code)



setAsDays
public static long setAsDays(long duration)(Code)



setAsElapsed
public static long setAsElapsed(long duration)(Code)



setAsElapsedDays
public static long setAsElapsedDays(long duration)(Code)



setAsElapsedHours
public static long setAsElapsedHours(long duration)(Code)



setAsElapsedMinutes
public static long setAsElapsedMinutes(long duration)(Code)



setAsElapsedMonths
public static long setAsElapsedMonths(long duration)(Code)



setAsElapsedPercent
public static long setAsElapsedPercent(long duration)(Code)



setAsElapsedSeconds
public static long setAsElapsedSeconds(long duration)(Code)



setAsElapsedWeeks
public static long setAsElapsedWeeks(long duration)(Code)



setAsElapsedYears
public static long setAsElapsedYears(long duration)(Code)



setAsEstimated
public static long setAsEstimated(long duration, boolean estimated)(Code)



setAsHours
public static long setAsHours(long duration)(Code)



setAsMinutes
public static long setAsMinutes(long duration)(Code)



setAsMonths
public static long setAsMonths(long duration)(Code)



setAsNonTemporal
public static long setAsNonTemporal(long duration)(Code)



setAsPercent
public static long setAsPercent(long duration)(Code)



setAsSeconds
public static long setAsSeconds(long duration)(Code)



setAsTimeUnit
public static long setAsTimeUnit(long duration, int type)(Code)



setAsWeeks
public static long setAsWeeks(long duration)(Code)



setAsYears
public static long setAsYears(long duration)(Code)



setEncodedMillis
public void setEncodedMillis(long encodedMillis)(Code)



setPercentAsDecimal
public static long setPercentAsDecimal(long duration, float percentAsDecimal)(Code)



setWork
public void setWork(boolean work)(Code)



timeUnitFactor
public static double timeUnitFactor(int type)(Code)



toString
public String toString()(Code)



useTimeUnitOfInNone
public static long useTimeUnitOfInNone(long duration, long durationWithUnit)(Code)
Use the time unit of another duration if this duration has none
Parameters:
  duration - input duraiton
Parameters:
  durationWithUnit - duration that has time unit the original duration if it had a time unit, otherwise the duration with the time unit of durationWithUnit



Methods inherited from java.lang.Number
public byte byteValue()(Code)(Java Doc)
abstract public double doubleValue()(Code)(Java Doc)
abstract public float floatValue()(Code)(Java Doc)
abstract public int intValue()(Code)(Java Doc)
abstract public long longValue()(Code)(Java Doc)
public short shortValue()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.