Package dafny
Class DafnySequence<T>
java.lang.Object
dafny.DafnySequence<T>
- All Implemented Interfaces:
Iterable<T>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TypeDescriptor<DafnySequence<? extends T>>_typeDescriptor(TypeDescriptor<T> elementType) asList()static DafnySequence<Character>static DafnySequence<CodePoint>final intstatic <T> DafnySequence<T>concatenate(DafnySequence<? extends T> th, DafnySequence<? extends T> other) booleanstatic <T> DafnySequence<T>Create(TypeDescriptor<T> type, BigInteger length, Function<BigInteger, T> init) final DafnySequence<T>drop(int lo) drop(long lo) drop(BigInteger lo) dropUnsigned(byte lo) dropUnsigned(int lo) dropUnsigned(long lo) dropUnsigned(short lo) Elements()abstract TypeDescriptor<T>static <T> DafnySequence<T>empty(TypeDescriptor<T> type) final booleanprotected booleanequalsNonLazy(dafny.NonLazyDafnySequence<T> other) Compare for equality to the given sequence, assuming that it is not null, not == to this, and not lazy.protected abstract dafny.NonLazyDafnySequence<T>force()static <T> DafnySequence<T>fromArray(TypeDescriptor<T> type, Array<T> elements) static <T> DafnySequence<T>fromArrayRange(TypeDescriptor<T> type, Array<T> elements, int lo, int hi) static DafnySequence<Byte>fromBytes(byte[] bytes) static <T> DafnySequence<T>fromList(TypeDescriptor<T> type, List<T> l) static <T> DafnySequence<T>fromRawArray(TypeDescriptor<T> type, Object elements) static <T> DafnySequence<T>fromRawArrayRange(TypeDescriptor<T> type, Object elements, int lo, int hi) abstract inthashCode()booleanisEmpty()<U> booleanisPrefixOf(DafnySequence<U> other) <U> booleanisProperPrefixOf(DafnySequence<U> other) iterator()abstract intlength()static DafnySequence<Boolean>of(boolean... elements) static DafnySequence<Byte>of(byte... elements) static DafnySequence<Character>of(char... elements) static DafnySequence<Integer>of(int... elements) static DafnySequence<Long>of(long... elements) static DafnySequence<Short>of(short... elements) static <T> DafnySequence<T>of(TypeDescriptor<T> type, T... elements) abstract Tselect(int i) select(long i) select(BigInteger i) selectUnsigned(byte i) selectUnsigned(int i) selectUnsigned(long i) selectUnsigned(short i) final DafnySequence<? extends DafnySequence<? extends T>>abstract DafnySequence<T>subsequence(int lo, int hi) final DafnySequence<T>take(int hi) take(long hi) take(BigInteger hi) takeUnsigned(byte hi) takeUnsigned(int hi) takeUnsigned(long hi) takeUnsigned(short hi) toArray()static byte[]toByteArray(DafnySequence<Byte> seq) static int[]toIntArray(DafnySequence<Integer> seq) toString()static <T> DafnySequence<T>unsafeWrapArray(Array<T> elements) Return a sequence backed by the given array without making a defensive copy.static DafnySequence<Byte>unsafeWrapBytes(byte[] bytes) Return a sequence backed by the given byte array without making a defensive copy.static <T> DafnySequence<T>unsafeWrapRawArray(TypeDescriptor<T> type, Object elements) abstract <R> DafnySequence<R>update(int i, R t) static <R> DafnySequence<R>update(DafnySequence<? extends R> seq, int idx, R t) static <R> DafnySequence<R>update(DafnySequence<? extends R> seq, long idx, R t) static <R> DafnySequence<R>update(DafnySequence<? extends R> seq, BigInteger b, R t)
-
Method Details
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
empty
-
fromArray
-
fromRawArray
-
unsafeWrapArray
Return a sequence backed by the given array without making a defensive copy. Only safe if the array never changes afterward. -
unsafeWrapRawArray
-
fromArrayRange
public static <T> DafnySequence<T> fromArrayRange(TypeDescriptor<T> type, Array<T> elements, int lo, int hi) -
fromRawArrayRange
public static <T> DafnySequence<T> fromRawArrayRange(TypeDescriptor<T> type, Object elements, int lo, int hi) -
fromList
-
asString
-
asUnicodeString
-
fromBytes
-
unsafeWrapBytes
Return a sequence backed by the given byte array without making a defensive copy. Only safe if the array never changes afterward. -
Create
public static <T> DafnySequence<T> Create(TypeDescriptor<T> type, BigInteger length, Function<BigInteger, T> init) -
_typeDescriptor
public static <T> TypeDescriptor<DafnySequence<? extends T>> _typeDescriptor(TypeDescriptor<T> elementType) -
toArray
-
toRawArray
-
toByteArray
-
toIntArray
-
elementType
-
isPrefixOf
-
isProperPrefixOf
-
asList
-
concatenate
public static <T> DafnySequence<T> concatenate(DafnySequence<? extends T> th, DafnySequence<? extends T> other) -
select
-
selectUnsigned
-
selectUnsigned
-
selectUnsigned
-
select
-
selectUnsigned
-
select
-
length
public abstract int length() -
isEmpty
public boolean isEmpty() -
cardinalityInt
public final int cardinalityInt() -
update
-
update
-
update
-
update
-
contains
-
subsequence
-
drop
-
dropUnsigned
-
dropUnsigned
-
dropUnsigned
-
drop
-
dropUnsigned
-
drop
-
take
-
takeUnsigned
-
takeUnsigned
-
takeUnsigned
-
take
-
takeUnsigned
-
take
-
slice
-
asDafnyMultiset
-
iterator
-
spliterator
- Specified by:
spliteratorin interfaceIterable<T>
-
equals
-
equalsNonLazy
Compare for equality to the given sequence, assuming that it is not null, not == to this, and not lazy. -
hashCode
public abstract int hashCode() -
toString
-
verbatimString
-
Elements
-
UniqueElements
-
force
- Returns:
- The sequence representing this sequence's actual value. That's usually just the sequence itself, but not if the sequence is lazily computed.
- See Also:
-