Example usage for java.nio FloatBuffer equals

List of usage examples for java.nio FloatBuffer equals

Introduction

In this page you can find the example usage for java.nio FloatBuffer equals.

Prototype

public boolean equals(Object other) 

Source Link

Document

Checks whether this float buffer is equal to another object.

Usage

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(0, 1.23F);/*from ww w  .  j a  v a  2s  . c o m*/

    floatBuffer.rewind();

    FloatBuffer floatBuffer1 = floatBuffer.slice();

    System.out.println(floatBuffer.equals(floatBuffer1));

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(0, 1.23F);//from w ww  . j  a  v a 2s .c o m

    floatBuffer.rewind();

    FloatBuffer floatBuffer1 = floatBuffer.compact();

    System.out.println(floatBuffer.equals(floatBuffer1));

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(0, 1.23F);/*from w ww. j av  a  2s.co m*/

    floatBuffer.rewind();

    FloatBuffer floatBuffer1 = floatBuffer.duplicate();

    System.out.println(floatBuffer.equals(floatBuffer1));

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(0, 1.23F);// w ww.  j av  a2 s  .  co  m

    floatBuffer.rewind();

    FloatBuffer floatBuffer1 = floatBuffer.asReadOnlyBuffer();

    System.out.println(floatBuffer.equals(floatBuffer1));

}