Package net.hydromatic.morel.eval
Class Unit
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
net.hydromatic.morel.eval.Unit
- All Implemented Interfaces:
Comparable<Unit>,Iterable,Collection,List,SequencedCollection
A placeholder value for the "unit" type.
We sometimes use it as a dummy value when we need to add a variable (and its type) to the compilation environment but we don't have a value (because it's not a runtime environment).
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Unit
private Unit()
-
-
Method Details
-
toString
- Overrides:
toStringin classAbstractCollection
-
get
- Specified by:
getin interfaceList- Specified by:
getin classAbstractList
-
size
public int size()- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceList- Specified by:
sizein classAbstractCollection
-
compareTo
- Specified by:
compareToin interfaceComparable<Unit>
-