ref_send API 2.17
defensive programming in Java

org.joe_e.array
Class BooleanArray.Builder

java.lang.Object
  extended by org.joe_e.array.ConstArray.Builder<E>
      extended by org.joe_e.array.ImmutableArray.Builder<E>
          extended by org.joe_e.array.PowerlessArray.Builder<java.lang.Boolean>
              extended by org.joe_e.array.BooleanArray.Builder
All Implemented Interfaces:
ArrayBuilder<java.lang.Boolean>
Enclosing class:
BooleanArray

public static final class BooleanArray.Builder
extends PowerlessArray.Builder<java.lang.Boolean>

A BooleanArray factory.


Method Summary
 void append(boolean newBoolean)
          Append a boolean
 void append(java.lang.Boolean newBoolean)
          Append a Boolean
 void append(boolean[] newBooleans)
          Append an array of booleans
 void append(java.lang.Boolean[] newBooleans)
          Append an array of Booleans
 void append(boolean[] newBooleans, int off, int len)
          Append a range of elements from an array of booleans
 void append(java.lang.Boolean[] newBooleans, int off, int len)
          Append a range of elements from an array of Booleans
 BooleanArray snapshot()
          Create a snapshot of the current content.
 
Methods inherited from class org.joe_e.array.ConstArray.Builder
length
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

append

public void append(java.lang.Boolean newBoolean)
Append a Boolean

Specified by:
append in interface ArrayBuilder<java.lang.Boolean>
Overrides:
append in class PowerlessArray.Builder<java.lang.Boolean>
Parameters:
newBoolean - the element to add
Throws:
java.lang.NegativeArraySizeException - if the resulting internal array would exceed the maximum length of a Java array. The builder is unmodified.

append

public void append(java.lang.Boolean[] newBooleans)
Append an array of Booleans

Specified by:
append in interface ArrayBuilder<java.lang.Boolean>
Overrides:
append in class PowerlessArray.Builder<java.lang.Boolean>
Parameters:
newBooleans - the elements to add
Throws:
java.lang.IndexOutOfBoundsException - if the resulting internal array would exceed the maximum length of a Java array. The builder is unmodified.

append

public void append(java.lang.Boolean[] newBooleans,
                   int off,
                   int len)
Append a range of elements from an array of Booleans

Specified by:
append in interface ArrayBuilder<java.lang.Boolean>
Overrides:
append in class PowerlessArray.Builder<java.lang.Boolean>
Parameters:
newBooleans - the array to add elements from
off - the index of the first element to add
len - the number of elements to add
Throws:
java.lang.IndexOutOfBoundsException - if an out-of-bounds index would be referenced or the resulting internal array would exceed the maximum length of a Java array. The builder is unmodified.

snapshot

public BooleanArray snapshot()
Create a snapshot of the current content.

Specified by:
snapshot in interface ArrayBuilder<java.lang.Boolean>
Overrides:
snapshot in class PowerlessArray.Builder<java.lang.Boolean>
Returns:
a BooleanArray containing the elements so far

append

public void append(boolean newBoolean)
Append a boolean

Parameters:
newBoolean - the element to add
Throws:
java.lang.NegativeArraySizeException - if the resulting internal array would exceed the maximum length of a Java array. The builder is unmodified.

append

public void append(boolean[] newBooleans)
Append an array of booleans

Parameters:
newBooleans - the elements to add
Throws:
java.lang.IndexOutOfBoundsException - if the resulting internal array would exceed the maximum length of a Java array. The builder is unmodified.

append

public void append(boolean[] newBooleans,
                   int off,
                   int len)
Append a range of elements from an array of booleans

Parameters:
newBooleans - the array to add elements from
off - the index of the first element to add
len - the number of elements to add
Throws:
java.lang.IndexOutOfBoundsException - if an out-of-bounds index would be referenced or the resulting internal array would exceed the maximum length of a Java array. The builder is unmodified.

ref_send API 2.17
defensive programming in Java

Submit a bug or feature, or get help

Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.