public class NSByteCountFormatter extends NSFormatter
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
NSByteCountFormatter(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static NSByteCountFormatter |
alloc() |
static NSByteCountFormatter |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
long |
allowedUnits()
Specify the units that can be used in the output.
|
boolean |
allowsNonnumericFormatting()
Choose whether to allow more natural display of some values, such as zero, where it may be displayed as "Zero KB," ignoring all other flags or options (with the exception of NSByteCountFormatterUseBytes, which would generate "Zero bytes").
|
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
long |
countStyle()
Specify how the count is displayed by indicating the number of bytes to be used for kilobyte.
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
long |
formattingContext()
Specify the formatting context for the formatted string.
|
static long |
hash_static() |
boolean |
includesActualByteCount()
Choose whether to parenthetically (localized as appropriate) display the actual number of bytes as well, for instance "723 KB (722,842 bytes)".
|
boolean |
includesCount() |
boolean |
includesUnit()
Choose whether to include the number or the units in the resulting formatted string.
|
NSByteCountFormatter |
init() |
NSByteCountFormatter |
initWithCoder(NSCoder coder)
NS_DESIGNATED_INITIALIZER
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
boolean |
isAdaptive()
Choose the display style.
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static NSByteCountFormatter |
new_objc() |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setAdaptive(boolean value)
Choose the display style.
|
void |
setAllowedUnits(long value)
Specify the units that can be used in the output.
|
void |
setAllowsNonnumericFormatting(boolean value)
Choose whether to allow more natural display of some values, such as zero, where it may be displayed as "Zero KB," ignoring all other flags or options (with the exception of NSByteCountFormatterUseBytes, which would generate "Zero bytes").
|
void |
setCountStyle(long value)
Specify how the count is displayed by indicating the number of bytes to be used for kilobyte.
|
void |
setFormattingContext(long value)
Specify the formatting context for the formatted string.
|
void |
setIncludesActualByteCount(boolean value)
Choose whether to parenthetically (localized as appropriate) display the actual number of bytes as well, for instance "723 KB (722,842 bytes)".
|
void |
setIncludesCount(boolean value) |
void |
setIncludesUnit(boolean value)
Choose whether to include the number or the units in the resulting formatted string.
|
static void |
setVersion_static(long aVersion) |
void |
setZeroPadsFractionDigits(boolean value)
Choose whether to zero pad fraction digits so a consistent number of fraction digits are displayed, causing updating displays to remain more stable.
|
java.lang.String |
stringForObjectValue(java.lang.Object obj)
Formats `obj` as a byte count (if `obj` is an `NSNumber`) or specific byte measurement (if `obj` is an `NSMeasurement`) using the receiver's settings.
|
java.lang.String |
stringFromByteCount(long byteCount)
Convenience method on stringForObjectValue:.
|
static java.lang.String |
stringFromByteCountCountStyle(long byteCount,
long countStyle)
Shortcut for converting a byte count into a string without creating an NSByteCountFormatter and an NSNumber.
|
java.lang.String |
stringFromMeasurement(NSMeasurement<NSUnitInformationStorage> measurement)
Formats the value of the given measurement using the receiver's `countStyle`.
|
static java.lang.String |
stringFromMeasurementCountStyle(NSMeasurement<NSUnitInformationStorage> measurement,
long countStyle)
Formats the value of the given measurement using the given `countStyle`.
|
static org.moe.natj.objc.Class |
superclass_static() |
static long |
version_static() |
boolean |
zeroPadsFractionDigits()
Choose whether to zero pad fraction digits so a consistent number of fraction digits are displayed, causing updating displays to remain more stable.
|
attributedStringForObjectValueWithDefaultAttributes, copyWithZone, editingStringForObjectValue, encodeWithCoder, getObjectValueForStringErrorDescription, isPartialStringValidNewEditingStringErrorDescription, isPartialStringValidProposedSelectedRangeOriginalStringOriginalSelectedRangeErrorDescriptionaccessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeyprotected NSByteCountFormatter(org.moe.natj.general.Pointer peer)
public static boolean accessInstanceVariablesDirectly()
public static NSByteCountFormatter alloc()
public static NSByteCountFormatter allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static NSByteCountFormatter new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static java.lang.String stringFromByteCountCountStyle(long byteCount,
long countStyle)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public long allowedUnits()
public boolean allowsNonnumericFormatting()
public long countStyle()
public long formattingContext()
public boolean includesActualByteCount()
public boolean includesCount()
public boolean includesUnit()
public NSByteCountFormatter init()
init in class NSFormatterpublic NSByteCountFormatter initWithCoder(NSCoder coder)
NSCodinginitWithCoder in interface NSCodinginitWithCoder in class NSFormatterpublic boolean isAdaptive()
public void setAdaptive(boolean value)
public void setAllowedUnits(long value)
public void setAllowsNonnumericFormatting(boolean value)
public void setCountStyle(long value)
public void setFormattingContext(long value)
public void setIncludesActualByteCount(boolean value)
public void setIncludesCount(boolean value)
public void setIncludesUnit(boolean value)
public void setZeroPadsFractionDigits(boolean value)
public java.lang.String stringFromByteCount(long byteCount)
public boolean zeroPadsFractionDigits()
public java.lang.String stringForObjectValue(java.lang.Object obj)
Returns `nil` if `obj` is not of the correct class (`NSNumber` or `NSMeasurement`). Throws an exception if `obj` is an `NSMeasurement` whose unit does not belong to the `NSUnitInformationStorage` dimension.
stringForObjectValue in class NSFormatterpublic java.lang.String stringFromMeasurement(NSMeasurement<NSUnitInformationStorage> measurement)
Throws an exception if the given measurement's unit does not belong to the `NSUnitInformationStorage` dimension.
public static java.lang.String stringFromMeasurementCountStyle(NSMeasurement<NSUnitInformationStorage> measurement, long countStyle)
Throws an exception if the given measurement's unit does not belong to the `NSUnitInformationStorage` dimension.