Package org.epics.util.array
Class ArrayBoolean
- java.lang.Object
-
- org.epics.util.array.ListBoolean
-
- org.epics.util.array.ArrayBoolean
-
- All Implemented Interfaces:
Serializable
public final class ArrayBoolean extends ListBoolean implements Serializable
Wraps aboolean[]into aListBoolean.- Author:
- Gabriele Carcassi
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ArrayBoolean(boolean... array)A new read-onlyArrayBooleanthat wraps around the given array.ArrayBoolean(boolean[] array, boolean readOnly)A newArrayBooleanthat wraps around the given array.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)booleangetBoolean(int index)Returns the element at the specified position in this list.static ArrayBooleanof(boolean... values)Returns an unmodifiableArrayBooleanwrapper for the givenbooleanarray.voidsetBoolean(int index, boolean value)Changes the element at the specified position.intsize()Returns the number of elements in the collection.-
Methods inherited from class org.epics.util.array.ListBoolean
hashCode
-
-
-
-
Constructor Detail
-
ArrayBoolean
public ArrayBoolean(boolean... array)
A new read-onlyArrayBooleanthat wraps around the given array.- Parameters:
array- an array
-
ArrayBoolean
public ArrayBoolean(boolean[] array, boolean readOnly)A newArrayBooleanthat wraps around the given array.- Parameters:
array- an arrayreadOnly- if false the wrapper allows writes to the array
-
-
Method Detail
-
size
public final int size()
Description copied from class:ListBooleanReturns the number of elements in the collection.- Specified by:
sizein classListBoolean- Returns:
- the number of elements in the collection
-
getBoolean
public boolean getBoolean(int index)
Description copied from class:ListBooleanReturns the element at the specified position in this list.- Specified by:
getBooleanin classListBoolean- Parameters:
index- position of the element to return- Returns:
- the element at the specified position in this list
-
setBoolean
public void setBoolean(int index, boolean value)Description copied from class:ListBooleanChanges the element at the specified position.- Specified by:
setBooleanin classListBoolean- Parameters:
index- position of the element to changevalue- the new value
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classListBoolean
-
of
public static ArrayBoolean of(boolean... values)
Returns an unmodifiableArrayBooleanwrapper for the givenbooleanarray.- Parameters:
values- a primitive array.- Returns:
- an immutable wrapper.
-
-