IntSequence.java 512 B

123456789101112131415161718192021222324
  1. // Copyright (c) 2015 Per M.A. Bothner.
  2. // This is free software; for terms and warranty disclaimer see ../../COPYING.
  3. package gnu.lists;
  4. import java.util.List;
  5. public interface IntSequence
  6. extends AVector<Integer>
  7. /* #ifdef JAVA8 */
  8. , java.util.function.IntUnaryOperator
  9. /* #endif */
  10. {
  11. public int getInt(int index);
  12. public int size();
  13. /* #ifdef JAVA8 */
  14. default int applyAsInt(int operand) {
  15. return getInt(operand);
  16. }
  17. /* #endif */
  18. }