|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.system.TimeDuration
public class TimeDuration
An object that represents a time duration value.
A Time Duration represents a length of time that is not attached to any particular point in the time line. For example, "3 hours" is a Time Duration, but "The time from 3:00 to 6:00" is not a Time Duration. A Time Duration can be added to a TimeInstant to create a new TimeInstant.
Constructor Summary | |
---|---|
TimeDuration()
Constructs a TimeDuration using ArcGIS Engine. |
|
TimeDuration(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. TimeDuration theTimeDuration = (TimeDuration) obj; |
Method Summary | |
---|---|
void |
addDays(double value)
Adds the input amount of days to the time duration. |
void |
addDuration(ITimeDuration timeDuration)
Adds a time duration. |
void |
addHours(double value)
Adds the input amount of hours to the time duration. |
void |
addMilliseconds(double value)
Adds the input amount of milliseconds to the time duration. |
void |
addMinutes(double value)
Adds the input amount of minutes to the time duration. |
void |
addNanoseconds(long value)
Adds the input amount of nanoseconds to the time duration. |
void |
addSeconds(double value)
Adds the input amount of seconds to the time duration. |
void |
addWeeks(double value)
Adds the input amount of weeks to the time duration. |
void |
assign(IClone src)
Assigns the properties of src to the receiver. |
int |
compare(ITimeDuration otherDuration)
Compares this time duration to the other time duration. |
Object |
convertToSupportedObject(int docVersion)
Convert the object to another object that is supported. |
void |
deserialize(IXMLSerializeData data)
Deserializes an object from XML. |
boolean |
equals(Object o)
Compare this object with another |
IClone |
esri_clone()
Clones the receiver and assigns the result to *clone. |
void |
getClassID(GUID[] pClassID)
getClassID |
static String |
getClsid()
getClsid. |
int |
getDays()
The time duration days component. |
int |
getHours()
The time duration hours component. |
String |
getMinNamespaceSupported()
The minimum namespace the class can serialize to (eg the 90 namespace). |
int |
getMinutes()
The time duration minutes component. |
int |
getNanoseconds()
The time duration nanoseconds component. |
int |
getSeconds()
The time duration seconds component. |
void |
getSizeMax(_ULARGE_INTEGER[] pcbSize)
getSizeMax |
int |
hashCode()
the hashcode for this object |
void |
isDirty()
isDirty |
boolean |
isEqual(IClone other)
Indicates if the receiver and other have the same properties. |
boolean |
isIdentical(IClone other)
Indicates if the receiver and other are the same object. |
boolean |
isPositive()
Indicates whether the time duration value is positive or negative. |
boolean |
isSupportedAtVersion(int docVersion)
Is this object valid at the given document version. |
boolean |
isZero()
Indicates whether the time duration's value is zero. |
void |
load(IStream pstm)
load |
double |
queryDayFraction()
The time duration day fraction portion as a day fraction. |
long |
queryDayFractionNanoseconds()
The time duration day fraction portion as the number of nanoseconds elapsed since midnight. |
long |
queryTicks()
Obtains the time duration as the number of ticks. |
double |
queryTotalDays()
Obtains the time duration as total days floating point value. |
double |
queryTotalHours()
Obtains the time duration as total hours floating point value. |
double |
queryTotalMinutes()
Obtains the time duration as total minutes floating point value. |
double |
queryTotalSeconds()
Obtains the time duration as total seconds floating point value. |
_WKSTimeDuration |
queryWKSTimeDuration()
Obtains time as a WKSTimeDuration. |
String |
queryXMLTimeDurationString()
Obtains the time duration as an XML time duration string. |
void |
readExternal(ObjectInput in)
|
void |
reset()
Reset the time duration to zero. |
void |
save(IStream pstm,
int fClearDirty)
save |
void |
scale(double scaleFactor)
Scales the time duration by a scale factor. |
void |
serialize(IXMLSerializeData data)
Serializes an object to XML. |
void |
setDayFraction(double dayFraction)
The time duration day fraction portion as a day fraction. |
void |
setDayFractionNanoseconds(long dayFractionNanoseconds)
The time duration day fraction portion as the number of nanoseconds elapsed since midnight. |
void |
setDays(int days)
The time duration days component. |
void |
setFromTicks(long ticks)
Writes the time duration from a given number of ticks. |
void |
setFromWKSTimeDuration(_WKSTimeDuration timeDuration)
Writes the time from a given WKSTimeDuration value. |
void |
setFromXMLTimeDurationString(String xmlTimeDurationString)
Writes the time duration from an XML time duration string. |
void |
setHours(int hours)
The time duration hours component. |
void |
setMinutes(int minutes)
The time duration minutes component. |
void |
setNanoseconds(int nanoseconds)
The time duration nanoseconds component. |
void |
setPositive(boolean positive)
Indicates whether the time duration value is positive or negative. |
void |
setSeconds(int seconds)
The time duration seconds component. |
void |
subtractDuration(ITimeDuration timeDuration)
Subtracts a time duration. |
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public TimeDuration() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic TimeDuration(Object obj) throws IOException
TimeDuration theTimeDuration = (TimeDuration) obj;
obj
to TimeDuration
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int getDays() throws IOException, AutomationException
getDays
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDays(int days) throws IOException, AutomationException
setDays
in interface ITimeDuration
days
- The days (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getHours() throws IOException, AutomationException
getHours
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setHours(int hours) throws IOException, AutomationException
setHours
in interface ITimeDuration
hours
- The hours (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getMinutes() throws IOException, AutomationException
getMinutes
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMinutes(int minutes) throws IOException, AutomationException
setMinutes
in interface ITimeDuration
minutes
- The minutes (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSeconds() throws IOException, AutomationException
getSeconds
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSeconds(int seconds) throws IOException, AutomationException
setSeconds
in interface ITimeDuration
seconds
- The seconds (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getNanoseconds() throws IOException, AutomationException
getNanoseconds
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setNanoseconds(int nanoseconds) throws IOException, AutomationException
setNanoseconds
in interface ITimeDuration
nanoseconds
- The nanoseconds (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isPositive() throws IOException, AutomationException
isPositive
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPositive(boolean positive) throws IOException, AutomationException
setPositive
in interface ITimeDuration
positive
- The positive (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public _WKSTimeDuration queryWKSTimeDuration() throws IOException, AutomationException
queryWKSTimeDuration
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setFromWKSTimeDuration(_WKSTimeDuration timeDuration) throws IOException, AutomationException
setFromWKSTimeDuration
in interface ITimeDuration
timeDuration
- A Structure: com.esri.arcgis.system._WKSTimeDuration (A com.esri.arcgis.system._WKSTimeDuration COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String queryXMLTimeDurationString() throws IOException, AutomationException
queryXMLTimeDurationString
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setFromXMLTimeDurationString(String xmlTimeDurationString) throws IOException, AutomationException
setFromXMLTimeDurationString
in interface ITimeDuration
xmlTimeDurationString
- The xmlTimeDurationString (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addWeeks(double value) throws IOException, AutomationException
addWeeks
in interface ITimeDuration
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addDays(double value) throws IOException, AutomationException
addDays
in interface ITimeDuration
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addHours(double value) throws IOException, AutomationException
addHours
in interface ITimeDuration
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addMinutes(double value) throws IOException, AutomationException
addMinutes
in interface ITimeDuration
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addSeconds(double value) throws IOException, AutomationException
addSeconds
in interface ITimeDuration
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addMilliseconds(double value) throws IOException, AutomationException
addMilliseconds
in interface ITimeDuration
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addNanoseconds(long value) throws IOException, AutomationException
addNanoseconds
in interface ITimeDuration
value
- Signed 64-bit int (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double queryTotalDays() throws IOException, AutomationException
queryTotalDays
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double queryTotalHours() throws IOException, AutomationException
queryTotalHours
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double queryTotalMinutes() throws IOException, AutomationException
queryTotalMinutes
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double queryTotalSeconds() throws IOException, AutomationException
queryTotalSeconds
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double queryDayFraction() throws IOException, AutomationException
queryDayFraction
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDayFraction(double dayFraction) throws IOException, AutomationException
setDayFraction
in interface ITimeDuration
dayFraction
- The dayFraction (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public long queryDayFractionNanoseconds() throws IOException, AutomationException
queryDayFractionNanoseconds
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDayFractionNanoseconds(long dayFractionNanoseconds) throws IOException, AutomationException
setDayFractionNanoseconds
in interface ITimeDuration
dayFractionNanoseconds
- Signed 64-bit int (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public long queryTicks() throws IOException, AutomationException
Using the QueryTicks function allows you to find the Ticks value, which is used in many Windows time controls.
queryTicks
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setFromTicks(long ticks) throws IOException, AutomationException
setFromTicks
in interface ITimeDuration
ticks
- Signed 64-bit int (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void reset() throws IOException, AutomationException
reset
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void scale(double scaleFactor) throws IOException, AutomationException
The scale function can be used to increase or decrease the given duration. For example, if you want to divide a time extent into 5 equal segments, you can get the TimeDuration from the TimeExent, then scale the TimeDuration by 1/5 and add the resulting TimeDuration to the TimeExtent's Start Time.
scale
in interface ITimeDuration
scaleFactor
- The scaleFactor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addDuration(ITimeDuration timeDuration) throws IOException, AutomationException
addDuration
in interface ITimeDuration
timeDuration
- A reference to a com.esri.arcgis.system.ITimeDuration (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void subtractDuration(ITimeDuration timeDuration) throws IOException, AutomationException
subtractDuration
in interface ITimeDuration
timeDuration
- A reference to a com.esri.arcgis.system.ITimeDuration (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isZero() throws IOException, AutomationException
isZero
in interface ITimeDuration
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int compare(ITimeDuration otherDuration) throws IOException, AutomationException
compare
in interface ITimeDuration
otherDuration
- A reference to a com.esri.arcgis.system.ITimeDuration (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void serialize(IXMLSerializeData data) throws IOException, AutomationException
serialize
in interface IXMLSerialize
data
- A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deserialize(IXMLSerializeData data) throws IOException, AutomationException
deserialize
in interface IXMLSerialize
data
- A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getMinNamespaceSupported() throws IOException, AutomationException
getMinNamespaceSupported
in interface IXMLVersionSupport
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IClone esri_clone() throws IOException, AutomationException
esri_clone
in interface IClone
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void assign(IClone src) throws IOException, AutomationException
assign
in interface IClone
src
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isEqual(IClone other) throws IOException, AutomationException
IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.
isEqual
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isIdentical(IClone other) throws IOException, AutomationException
IsIdentical returns true if the receiver and the source reference the same object.
isIdentical
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void isDirty() throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
isDirty
in interface IPersistStream
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void load(IStream pstm) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
load
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void save(IStream pstm, int fClearDirty) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
save
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)fClearDirty
- The fClearDirty (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getSizeMax(_ULARGE_INTEGER[] pcbSize) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
getSizeMax
in interface IPersistStream
pcbSize
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getClassID(GUID[] pClassID) throws IOException, AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID
in interface IPersist
pClassID
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isSupportedAtVersion(int docVersion) throws IOException, AutomationException
Use IsSupportedAtVersion to identify if a particular object should be saved to the ObjectStream. This result is based on the esriArcGISVersion enumeration. In some instances, if the object is not supported at a particular ArcGIS version, the object may support conversion to another similar object; use IDocumentVersionSupportGEN::ConvertToSupportedObject to accomplish this.
isSupportedAtVersion
in interface IDocumentVersionSupportGEN
docVersion
- A com.esri.arcgis.system.esriArcGISVersion constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object convertToSupportedObject(int docVersion) throws IOException, AutomationException
This method should be used when IDocumentVersionSupportGEN::IsSupportedAtVersion returns FALSE. Calling ConvertToSupportedObject will return an IUnknown pointer to a relevant object supported at the particular ArcGIS version. Not all objects will return a supported object; in these cases a null pointer will be returned.
convertToSupportedObject
in interface IDocumentVersionSupportGEN
docVersion
- A com.esri.arcgis.system.esriArcGISVersion constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |