示例#1
0
        /// <summary>Turns an IntBuffer into a HashSet of integers</summary>
        /// <param name="buffer"/>
        /// <returns/>
        public static java.util.HashSet <int> toHashSet(java.nio.IntBuffer buffer)
        {
            int limit = buffer.limit();

            java.util.HashSet <int> ints = new java.util.HashSet <int>(limit);
            for (int i = 0; i < limit; i++)
            {
                ints.add(buffer.get(i));
            }
            return(ints);
        }
示例#2
0
 public virtual global::java.nio.IntBuffer put(java.nio.IntBuffer arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallObjectMethod(this.JvmHandle, global::java.nio.IntBuffer._put14229, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))) as java.nio.IntBuffer);
     }
     else
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::java.nio.IntBuffer.staticClass, global::java.nio.IntBuffer._put14229, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))) as java.nio.IntBuffer);
     }
 }
示例#3
0
 public virtual int compareTo(java.nio.IntBuffer arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(@__env.CallIntMethod(this.JvmHandle, global::java.nio.IntBuffer._compareTo14238, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)));
     }
     else
     {
         return(@__env.CallNonVirtualIntMethod(this.JvmHandle, global::java.nio.IntBuffer.staticClass, global::java.nio.IntBuffer._compareTo14238, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)));
     }
 }
示例#4
0
 public static java.nio.ByteBuffer integerListToByteBuffer(System.Collections.Generic.IList
                                                           <int> termIds)
 {
     java.nio.ByteBuffer byteBuffer = java.nio.ByteBuffer.allocate(termIds.Count * 4).
                                      order(java.nio.ByteOrder.nativeOrder());
     java.nio.IntBuffer intBuffer = byteBuffer.asIntBuffer();
     foreach (int termId in termIds)
     {
         intBuffer.put(termId);
     }
     return(byteBuffer);
 }
示例#5
0
        public static System.Collections.Generic.IList <int> toList(java.nio.IntBuffer buffer
                                                                    )
        {
            int limit = buffer.limit();

            System.Collections.Generic.IList <int> list = new System.Collections.Generic.List <
                int>(limit);
            for (int i = 0; i < limit; i++)
            {
                list.add(buffer.get(i));
            }
            return(list);
        }
 public override java.nio.IntBuffer put(java.nio.IntBuffer buf)
 {
     throw new java.nio.ReadOnlyBufferException();
 }
示例#7
0
 public static int glQueryMatrixxOES(java.nio.IntBuffer arg0, java.nio.IntBuffer arg1)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     return(@__env.CallStaticIntMethod(android.opengl.GLES10Ext.staticClass, global::android.opengl.GLES10Ext._glQueryMatrixxOES5676, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1)));
 }
示例#8
0
 public static java.nio.ByteBuffer toByteBuffer(java.nio.IntBuffer buffer)
 {
     System.Collections.Generic.IList <int> list = toList(buffer);
     return(integerListToByteBuffer(list));
 }