1 /* 2 * Copyright 2010 Daniel Kurka 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 * use this file except in compliance with the License. You may obtain a copy of 6 * the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 * License for the specific language governing permissions and limitations under 14 * the License. 15 */ 16 package com.googlecode.mgwt.collection.shared; 17 18 /** 19 * A light array implements the same interface as a javascript array. 20 * 21 * @author Daniel Kurka 22 * 23 */ 24 public interface LightArrayBoolean { 25 /** 26 * pop a value from the array 27 * 28 * @return the value 29 */ 30 public boolean shift(); 31 32 /** 33 * get the object at a specific index 34 * 35 * @param index the index 36 * @return the object or null 37 */ 38 public boolean get(int index); 39 40 /** 41 * put an object to a given index. the array autoexpands and fills up missing values with null 42 * 43 * @param index the index 44 * @param value the value to store 45 */ 46 public void set(int index, boolean value); 47 48 /** 49 * the length of the array 50 * 51 * @return the length of the array 52 */ 53 public int length(); 54 55 /** 56 * push a value onto the array 57 * 58 * @param value to push 59 */ 60 public void unshift(boolean value); 61 62 /** 63 * push a value on to the array 64 * 65 * @param value 66 */ 67 public void push(boolean value); 68 }