Package org.qdl_lang.variables
Class SparseEntry
- java.lang.Object
-
- org.qdl_lang.variables.SparseEntry
-
- All Implemented Interfaces:
Serializable
,Comparable
public class SparseEntry extends Object implements Comparable, Serializable
Comparable entries for sparse entries. This contains the index and the actual entry itself. You can get this usingQDLList.first()
andQDLList.last()
.Created by Jeff Gaynor
on 2/20/20 at 8:35 AM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description BigInteger
bigIndex
QDLValue
entry
long
index
-
Constructor Summary
Constructors Constructor Description SparseEntry(long index)
Useful for making index entries, i.e., checking is an element is at a certain index but not caring about the entry (which we never do, since we are modelling lists with these).SparseEntry(long index, QDLValue entry)
SparseEntry(BigInteger index, QDLValue entry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Object v)
This method checks the index of a sparse entry.boolean
equals(Object obj)
String
toString()
-
-
-
Field Detail
-
index
public long index
-
entry
public QDLValue entry
-
bigIndex
public BigInteger bigIndex
-
-
Constructor Detail
-
SparseEntry
public SparseEntry(long index)
Useful for making index entries, i.e., checking is an element is at a certain index but not caring about the entry (which we never do, since we are modelling lists with these).- Parameters:
index
-
-
SparseEntry
public SparseEntry(long index, QDLValue entry)
-
SparseEntry
public SparseEntry(BigInteger index, QDLValue entry)
-
-
Method Detail
-
compareTo
public int compareTo(Object v)
This method checks the index of a sparse entry.- Specified by:
compareTo
in interfaceComparable
- Parameters:
v
-- Returns:
-
-