Nil.java
/**
* Copyright 2010,2021 Nikolas S Boyd.
Permission is granted to copy this work provided this copyright statement is retained in all copies.
*/
package Hoot.Behaviors;
import Hoot.Runtime.Functions.*;
import Hoot.Runtime.Faces.*;
import Hoot.Runtime.Values.*;
import Hoot.Runtime.Blocks.*;
import Smalltalk.Core.*;
import Smalltalk.Blocks.*;
import Smalltalk.Magnitudes.*;
import Hoot.Magnitudes.*;
import Hoot.Magnitudes.Integer;
import Hoot.Magnitudes.Character;
import Hoot.Magnitudes.Float;
import Hoot.Magnitudes.Double;
import Hoot.Collections.*;
import Hoot.Collections.String;
import Hoot.Runtime.Behaviors.HootRegistry;
import Smalltalk.Core.Undefined;
public class Nil extends Object implements Undefined
{
protected static final Nil Literal = new Nil();
/**
* @return
*/
public static Nil literal()
{
java.lang.String exitID = "Nil>>$literal";
Frame f0 = new Frame(exitID);
return (Nil)Literal;
}
/**
*
*/
protected Nil()
{
java.lang.String exitID = "Nil>>Nil";
Frame f0 = new Frame(exitID);
HootRegistry.registerValue(this);
}
/**
* @return
*/
public java.lang.Object asPrimitive()
{
java.lang.String exitID = "Nil>>asPrimitive";
Frame f0 = new Frame(exitID);
return (java.lang.Object)null;
}
/**
* @return
*/
@Override public int hashCode()
{
java.lang.String exitID = "Nil>>hashCode";
Frame f0 = new Frame(exitID);
return (int)0;
}
/**
* @return
*/
@Override public Nil copy()
{
java.lang.String exitID = "Nil>>copy";
Frame f0 = new Frame(exitID);
return (Nil)this;
}
/**
* @return
*/
@Override public Nil deepCopy()
{
java.lang.String exitID = "Nil>>deepCopy";
Frame f0 = new Frame(exitID);
return (Nil)this;
}
/**
* @return
*/
@Override public Nil shallowCopy()
{
java.lang.String exitID = "Nil>>shallowCopy";
Frame f0 = new Frame(exitID);
return (Nil)this;
}
/**
* @return
*/
@Override public Boolean isSame(final Object candidate)
{
java.lang.String exitID = "Nil>>isSame";
Frame f0 = new Frame(exitID);
if ((candidate == null)) {
return True.literal();
};
return (Boolean)Boolean.from((this == candidate));
}
/**
* @return
*/
@Override public Boolean isSame(final Subject candidate)
{
java.lang.String exitID = "Nil>>isSame";
Frame f0 = new Frame(exitID);
if ((candidate == null)) {
return True.literal();
};
return (Boolean)Boolean.from((this == candidate));
}
/**
* @return
*/
@Override public Object ifNil(final NiladicValuable nilBlock)
{
java.lang.String exitID = "Nil>>ifNil";
Frame f0 = new Frame(exitID);
return (Object)((Object)nilBlock.value());
}
/**
* @return
*/
@Override public Object ifNil_ifExtant(final NiladicValuable nilBlock, final NiladicValuable extantBlock)
{
java.lang.String exitID = "Nil>>ifNil_ifExtant";
Frame f0 = new Frame(exitID);
return (Object)((Object)nilBlock.value());
}
/**
* @return
*/
@Override public Object ifExtant(final NiladicValuable extantBlock)
{
java.lang.String exitID = "Nil>>ifExtant";
Frame f0 = new Frame(exitID);
return (Object)this;
}
/**
* @return
*/
@Override public Object ifExtant_ifNil(final NiladicValuable extantBlock, final NiladicValuable nilBlock)
{
java.lang.String exitID = "Nil>>ifExtant_ifNil";
Frame f0 = new Frame(exitID);
return (Object)((Object)nilBlock.value());
}
/**
* @return
*/
@Override public Boolean isBehavior()
{
java.lang.String exitID = "Nil>>isBehavior";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public Boolean isClass()
{
java.lang.String exitID = "Nil>>isClass";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public Boolean isMetaclass()
{
java.lang.String exitID = "Nil>>isMetaclass";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public Boolean isNil()
{
java.lang.String exitID = "Nil>>isNil";
Frame f0 = new Frame(exitID);
return (Boolean)True.literal();
}
/**
* @return
*/
@Override public Boolean isArray()
{
java.lang.String exitID = "Nil>>isArray";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public Boolean isBoolean()
{
java.lang.String exitID = "Nil>>isBoolean";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public Boolean isCharacter()
{
java.lang.String exitID = "Nil>>isCharacter";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public Boolean isCollection()
{
java.lang.String exitID = "Nil>>isCollection";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public Boolean isFloat()
{
java.lang.String exitID = "Nil>>isFloat";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public Boolean isInteger()
{
java.lang.String exitID = "Nil>>isInteger";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public Boolean isLiteral()
{
java.lang.String exitID = "Nil>>isLiteral";
Frame f0 = new Frame(exitID);
return (Boolean)True.literal();
}
/**
* @return
*/
@Override public Boolean isSmallInteger()
{
java.lang.String exitID = "Nil>>isSmallInteger";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public Boolean isString()
{
java.lang.String exitID = "Nil>>isString";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public Boolean notNil()
{
java.lang.String exitID = "Nil>>notNil";
Frame f0 = new Frame(exitID);
return (Boolean)False.literal();
}
/**
* @return
*/
@Override public String printString()
{
java.lang.String exitID = "Nil>>printString";
Frame f0 = new Frame(exitID);
return (String)String.from("nil");
}
/**
* @return
*/
@Override public java.lang.String toString()
{
java.lang.String exitID = "Nil>>toString";
Frame f0 = new Frame(exitID);
return (java.lang.String)this.printString().primitiveString();
}
}