Example usage for java.nio ShortBuffer equals

List of usage examples for java.nio ShortBuffer equals

Introduction

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

Prototype

public boolean equals(Object other) 

Source Link

Document

Checks whether this short buffer is equal to another object.

Usage

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer shortBuffer = ShortBuffer.allocate(10);
    shortBuffer.put((short) 100);

    shortBuffer.rewind();//from ww w. j  av a 2s.  c o  m

    ShortBuffer shortBuffer2 = shortBuffer.slice();

    System.out.println(shortBuffer2.equals(shortBuffer2));

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer shortBuffer = ShortBuffer.allocate(10);
    shortBuffer.put((short) 100);

    shortBuffer.rewind();//from w  w  w. j  a va2s.c o  m

    ShortBuffer shortBuffer2 = shortBuffer.compact();

    System.out.println(shortBuffer2.equals(shortBuffer2));

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer shortBuffer = ShortBuffer.allocate(10);
    shortBuffer.put((short) 100);

    shortBuffer.rewind();//from w  w  w  .  j a  v a 2  s  . c o m

    ShortBuffer shortBuffer2 = shortBuffer.duplicate();

    System.out.println(shortBuffer2.equals(shortBuffer2));

}