Package io.pravega.common.util
Class AbstractBufferView
- java.lang.Object
-
- io.pravega.common.util.AbstractBufferView
-
- All Implemented Interfaces:
BufferView
- Direct Known Subclasses:
ByteArraySegment,CompositeByteArraySegment
public abstract class AbstractBufferView extends java.lang.Object implements BufferView
Base implementation ofBufferView, providing common functionality. Derived classes may override these methods with more efficient implementations tailored to their data types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractBufferView.AbstractReaderBase implementation ofBufferView.Reader.-
Nested classes/interfaces inherited from interface io.pravega.common.util.BufferView
BufferView.Collector<ExceptionT extends java.lang.Exception>, BufferView.Reader
-
-
Constructor Summary
Constructors Constructor Description AbstractBufferView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(BufferView other)Checks for equality against anotherBufferViewinstance.booleanequals(java.lang.Object obj)inthashCode()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.pravega.common.util.BufferView
collect, copyTo, copyTo, getAllocatedLength, getBufferViewReader, getCopy, getLength, getReader, getReader, iterateBuffers, release, retain, slice, slice
-
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
equals
public boolean equals(BufferView other)
Checks for equality against anotherBufferViewinstance. Note: this method provides a general implementation of equality. Derived classes should override this method with more efficient implementations if available.- Parameters:
other- The otherBufferViewinstance.- Returns:
- True if this instance and the other instance have the same contents.
-
-