Module de.ibapl.jnhw.common
Package de.ibapl.jnhw.common.memory
Class StructArray32<T extends OpaqueMemory32>
- java.lang.Object
-
- de.ibapl.jnhw.common.memory.AbstractNativeMemory
-
- de.ibapl.jnhw.common.memory.OpaqueMemory32
-
- de.ibapl.jnhw.common.memory.StructArray32<T>
-
- Type Parameters:
T-
public abstract class StructArray32<T extends OpaqueMemory32> extends OpaqueMemory32 implements Iterable<T>
- Author:
- aploese
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceStructArray32.ElementFactory<T extends OpaqueMemory32>-
Nested classes/interfaces inherited from class de.ibapl.jnhw.common.memory.OpaqueMemory32
OpaqueMemory32.OpaqueMemory32Producer<T extends OpaqueMemory32,P extends AbstractNativeMemory>
-
Nested classes/interfaces inherited from class de.ibapl.jnhw.common.memory.AbstractNativeMemory
AbstractNativeMemory.SetMem
-
-
Field Summary
-
Fields inherited from class de.ibapl.jnhw.common.memory.OpaqueMemory32
sizeInBytes
-
Fields inherited from class de.ibapl.jnhw.common.memory.AbstractNativeMemory
baseAddress, CLEANER, LOG, MEM_ACCESS, MEM_ACCESS_PROPERTY, NULL, parent
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStructArray32(AbstractNativeMemory parent, long offset, T[] array, StructArray32.ElementFactory<T> factory, int elementSizeInBytes, AbstractNativeMemory.SetMem setMem)protectedStructArray32(T[] array, StructArray32.ElementFactory<T> factory, int elementSizeInBytes, AbstractNativeMemory.SetMem setMem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforEach(Consumer<? super T> action)Tget(int index)BaseDataTypegetBaseDataType()Iterator<T>iterator()intlength()length is alway>= 0StringnativeToHexString()voidnativeToString(Appendable sb, String indentPrefix, String indent)Spliterator<T>spliterator()-
Methods inherited from class de.ibapl.jnhw.common.memory.OpaqueMemory32
checkIndex, clear, copy, copy, equals, getByte, getSizeInBytes, hashCode, memset, nativeToString, printMemory, printMemory, setByte, setMemTo, toBytes, toString
-
Methods inherited from class de.ibapl.jnhw.common.memory.AbstractNativeMemory
calcOffsetForAlignment, getOffset, getSizeInBytes, isSameAddress, offsetof, toNativeAddressHolder, toUintptr_t, toUintptr_tOrNULL
-
-
-
-
Constructor Detail
-
StructArray32
protected StructArray32(T[] array, StructArray32.ElementFactory<T> factory, int elementSizeInBytes, AbstractNativeMemory.SetMem setMem)
-
StructArray32
protected StructArray32(AbstractNativeMemory parent, long offset, T[] array, StructArray32.ElementFactory<T> factory, int elementSizeInBytes, AbstractNativeMemory.SetMem setMem)
-
-
Method Detail
-
get
public final T get(int index)
-
length
public final int length()
length is alway>= 0- Returns:
- the length of this array of given struct.
-
nativeToString
public void nativeToString(Appendable sb, String indentPrefix, String indent) throws IOException
- Specified by:
nativeToStringin interfaceNative- Overrides:
nativeToStringin classOpaqueMemory32- Throws:
IOException
-
nativeToHexString
public String nativeToHexString()
- Specified by:
nativeToHexStringin interfaceNative
-
getBaseDataType
public BaseDataType getBaseDataType()
- Specified by:
getBaseDataTypein interfaceNative
-
iterator
public Iterator<T> iterator()
- Specified by:
iteratorin interfaceIterable<T extends OpaqueMemory32>
-
forEach
public void forEach(Consumer<? super T> action)
- Specified by:
forEachin interfaceIterable<T extends OpaqueMemory32>
-
spliterator
public Spliterator<T> spliterator()
- Specified by:
spliteratorin interfaceIterable<T extends OpaqueMemory32>
-
-