Skip to content

Instantly share code, notes, and snippets.

@steffimueller
Created May 6, 2015 15:59
Show Gist options
  • Save steffimueller/b48d64303f2579b86a5a to your computer and use it in GitHub Desktop.
Save steffimueller/b48d64303f2579b86a5a to your computer and use it in GitHub Desktop.
#ifndef _JavaUtilArrayList_H_
#define _JavaUtilArrayList_H_
#include "J2ObjC_header.h"
#include "java/io/Serializable.h"
#include "java/util/AbstractList.h"
#include "java/util/RandomAccess.h"
@class IOSObjectArray;
@class JavaLangIndexOutOfBoundsException;
@protocol JavaUtilCollection;
@protocol JavaUtilIterator;
@interface JavaUtilArrayList : JavaUtilAbstractList < NSCopying, JavaIoSerializable, JavaUtilRandomAccess > {
@public
jint size__;
IOSObjectArray *array_;
}
#pragma mark Public
- (instancetype)init;
- (instancetype)initWithJavaUtilCollection:(id<JavaUtilCollection>)collection;
- (instancetype)initWithInt:(jint)capacity;
- (jboolean)addWithId:(id)object;
- (void)addWithInt:(jint)index
withId:(id)object;
- (jboolean)addAllWithJavaUtilCollection:(id<JavaUtilCollection>)collection;
- (jboolean)addAllWithInt:(jint)index
withJavaUtilCollection:(id<JavaUtilCollection>)collection;
- (void)clear;
- (id)clone;
- (jboolean)containsWithId:(id)object;
- (void)ensureCapacityWithInt:(jint)minimumCapacity;
- (jboolean)isEqual:(id)o;
- (id)getWithInt:(jint)index;
- (NSUInteger)hash;
- (jint)indexOfWithId:(id)object;
- (jboolean)isEmpty;
- (id<JavaUtilIterator>)iterator;
- (jint)lastIndexOfWithId:(id)object;
- (id)removeWithInt:(jint)index;
- (jboolean)removeWithId:(id)object;
- (id)setWithInt:(jint)index
withId:(id)object;
- (jint)size;
- (IOSObjectArray *)toArray;
- (IOSObjectArray *)toArrayWithNSObjectArray:(IOSObjectArray *)contents;
- (void)trimToSize;
#pragma mark Protected
- (void)removeRangeWithInt:(jint)fromIndex
withInt:(jint)toIndex;
#pragma mark Package-Private
+ (JavaLangIndexOutOfBoundsException *)throwIndexOutOfBoundsExceptionWithInt:(jint)index
withInt:(jint)size;
@end
J2OBJC_EMPTY_STATIC_INIT(JavaUtilArrayList)
J2OBJC_FIELD_SETTER(JavaUtilArrayList, array_, IOSObjectArray *)
FOUNDATION_EXPORT void JavaUtilArrayList_initWithInt_(JavaUtilArrayList *self, jint capacity);
FOUNDATION_EXPORT JavaUtilArrayList *new_JavaUtilArrayList_initWithInt_(jint capacity) NS_RETURNS_RETAINED;
FOUNDATION_EXPORT void JavaUtilArrayList_init(JavaUtilArrayList *self);
FOUNDATION_EXPORT JavaUtilArrayList *new_JavaUtilArrayList_init() NS_RETURNS_RETAINED;
FOUNDATION_EXPORT void JavaUtilArrayList_initWithJavaUtilCollection_(JavaUtilArrayList *self, id<JavaUtilCollection> collection);
FOUNDATION_EXPORT JavaUtilArrayList *new_JavaUtilArrayList_initWithJavaUtilCollection_(id<JavaUtilCollection> collection) NS_RETURNS_RETAINED;
FOUNDATION_EXPORT JavaLangIndexOutOfBoundsException *JavaUtilArrayList_throwIndexOutOfBoundsExceptionWithInt_withInt_(jint index, jint size);
J2OBJC_TYPE_LITERAL_HEADER(JavaUtilArrayList)
#endif // _JavaUtilArrayList_H_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment