Class NSDate
java.lang.Object
com.dd.plist.NSObject
com.dd.plist.NSDate
- All Implemented Interfaces:
Cloneable,Comparable<NSObject>
The NSDate class wraps a date.
- Author:
- Daniel Dreibrodt
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNSDate(byte[] bytes) Creates new NSDate instance from its binary representation.NSDate(byte[] bytes, int startIndex, int endIndex) Creates a new NSDate instance from its binary representation.Creates a new NSDate instance from is textual representation.Creates a new NSDate instance. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a deep copy of this instance.intbooleangetDate()Gets the date.inthashCode()protected voidtoASCII(StringBuilder ascii, int level) protected voidtoASCIIGnuStep(StringBuilder ascii, int level) Converts this NSObject into an equivalent object of the Java Runtime Environment.toString()Generates a string representation of the date.Methods inherited from class com.dd.plist.NSObject
fromJavaObject, getLocationInformation, indent, toJavaObject, toXMLPropertyList
-
Constructor Details
-
NSDate
public NSDate(byte[] bytes) Creates new NSDate instance from its binary representation.- Parameters:
bytes- The binary date representation.
-
NSDate
public NSDate(byte[] bytes, int startIndex, int endIndex) Creates a new NSDate instance from its binary representation.- Parameters:
bytes- The byte array containing the date data.startIndex- The index within the array at which the date data begins.endIndex- The index within the array at which the data date ends.
-
NSDate
Creates a new NSDate instance from is textual representation. The textual representation must adhere to one of the following patterns. For XML property lists:yyyy-MM-dd'T'HH:mm:ss'Z'For ASCII property lists:yyyy-MM-dd HH:mm:ss Z- Parameters:
textRepresentation- The textual representation of the date.- Throws:
ParseException- If the date could not be parsed, i.e. it does not match the expected pattern.
-
NSDate
-
-
Method Details
-
getDate
-
equals
-
hashCode
-
clone
-
toString
-
toJavaObject
Description copied from class:NSObjectConverts this NSObject into an equivalent object of the Java Runtime Environment.NSArrayobjects are converted to arrays.NSDictionaryobjects are converted to objects extending theMapclass.NSSetobjects are converted to objects extending theSetclass.NSNumberobjects are converted to primitive number values (int, long, double or boolean).NSStringobjects are converted toStringobjects.NSDataobjects are converted to byte arrays.NSDateobjects are converted toDateobjects.UIDobjects are converted to byte arrays.
- Specified by:
toJavaObjectin classNSObject- Returns:
- A native java object representing this NSObject's value.
-
compareTo
-
toASCII
-
toASCIIGnuStep
-