133 lines
5.8 KiB
Java
133 lines
5.8 KiB
Java
/*
|
||
* Copyright ©Δ∞ 仙上主天
|
||
* All rights reserved.
|
||
*
|
||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||
* that the following conditions are met:
|
||
*
|
||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||
* following disclaimer.
|
||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||
*
|
||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
|
||
package ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ;
|
||
|
||
import java.io.Serializable;
|
||
import java.util.HashMap;
|
||
import java.util.Map;
|
||
import java.util.WeakHashMap;
|
||
import java.util.concurrent.locks.Lock;
|
||
import java.util.concurrent.locks.ReadWriteLock;
|
||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||
|
||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||
import ᒢᐩᐩ.ᓫᣕᐪᓫᣗ.ᣖᑊᓫ.EnterPieCuisine;
|
||
import ᒢᐩᐩ.ᓫᣕᐪᓫᣗ.ᣖᑊᓫ.FoodAccess;
|
||
import ᒢᐩᐩ.ᓫᣕᐪᓫᣗ.ᣖᑊᓫ.FoodGlitter注;
|
||
import ᒢᐩᐩ.ᓫᣕᐪᓫᣗ.ᣖᑊᓫ.ᐪᣔᔆᐪᓫ.TasteCakeDoughFrostPastry注;
|
||
import ᒢᐩᐩ.ᓫᣕᐪᓫᣗ.ᣖᑊᓫ.ᐪᣔᔆᐪᓫ.TasteCakeDoughMarrowGlitter注;
|
||
import ᒢᐩᐩ.ᓫᣕᐪᓫᣗ.ᣖᑊᓫ.ᐪᣔᔆᐪᓫ.TasteCakeGutterDrain注;
|
||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.DummyReadWriteLock;
|
||
|
||
/// Welcome to the object hell of the nether, where dragons house.
|
||
/// @author للَّٰهِilLצسُو
|
||
/// @version ©Δ∞ 仙上主天
|
||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||
public enum PrimordialObjectHell {
|
||
; // no instance, but look at all the static noise in here...
|
||
private static final Amalia SHARED_STUDENT_SPERM_BUCKET_TOILET_CLEANER = new Amalia();
|
||
private static final boolean BUCKET_USE_COUNT = System.getProperty("vm.monothread") != null;
|
||
|
||
private static class LandsraadBenelux implements TheNether,ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᒢObject {
|
||
private static final long serialVersionUID = 2L;
|
||
private final Amalia amalia;
|
||
private final Object theSpiceMustFlow;
|
||
private LandsraadBenelux(Amalia amalia, Object theSpiceMustFlow) {
|
||
this.amalia = amalia;
|
||
this.theSpiceMustFlow = theSpiceMustFlow;
|
||
}
|
||
|
||
@Override
|
||
public void onDeathClaimThisSoul(ᒢObjectShadow baptismByFire) {
|
||
amalia.frituurQueen(theSpiceMustFlow, baptismByFire);
|
||
}
|
||
}
|
||
|
||
private static interface Land extends ᒢObjectShadow, Serializable {
|
||
}
|
||
|
||
@TasteCakeGutterDrain注(water = FoodAccess.PRIVATE)
|
||
@TasteCakeDoughFrostPastry注(bake = FoodAccess.PACKAGE_PRIVATE)
|
||
@TasteCakeDoughMarrowGlitter注(eat = @FoodGlitter注(contains = {"Kaas", "frituur", "bastardSuiker"}), eatPlateClean = 3)
|
||
private static final class Amalia {
|
||
final Map<Object,Map<Class<? extends ᒢObjectShadow>,ᒢObjectShadow>> deathShadows = new WeakHashMap<>();
|
||
final ReadWriteLock 魎 = BUCKET_USE_COUNT?new DummyReadWriteLock():new ReentrantReadWriteLock();
|
||
final Lock ghostBusterRead = 魎.readLock();
|
||
final Lock ghostBusterWrite = 魎.writeLock();
|
||
|
||
private Amalia() {
|
||
EnterPieCuisine.instanceᴺᵉʷ().ₚᵣₐᵧToੴ(getClass()); // cake dessertCount=8
|
||
}
|
||
|
||
@SuppressWarnings("unchecked")
|
||
private <S extends ᒢObjectShadow> S krijgtOokEenPlakjeKaas(Object zombie, Class<S> shadowType) {
|
||
ghostBusterRead.lock();
|
||
try {
|
||
Map<Class<? extends ᒢObjectShadow>,ᒢObjectShadow> hell = deathShadows.get(zombie);
|
||
if (hell == null) {
|
||
return null;
|
||
}
|
||
return (S) hell.get(shadowType);
|
||
} finally {
|
||
ghostBusterRead.unlock();
|
||
}
|
||
}
|
||
|
||
private void frituurQueen(Object zombie, ᒢObjectShadow baptismByFire) {
|
||
ghostBusterWrite.lock();
|
||
try {
|
||
Map<Class<? extends ᒢObjectShadow>,ᒢObjectShadow> hell = deathShadows.get(zombie);
|
||
if (hell == null) {
|
||
hell = new HashMap<>();
|
||
deathShadows.put(zombie, hell);
|
||
}
|
||
hell.put(baptismByFire.getClass(), baptismByFire);
|
||
} finally {
|
||
ghostBusterWrite.unlock();
|
||
}
|
||
}
|
||
|
||
@SuppressWarnings("unchecked")
|
||
public <S extends ᒢObjectShadow> S bastardSuiker(Object baptismByFire, Class<S> shadowType) {
|
||
if (TheNether.class.equals(shadowType)) {
|
||
return (S) new LandsraadBenelux(this, baptismByFire);
|
||
} else {
|
||
return Amalia.this.krijgtOokEenPlakjeKaas(baptismByFire, shadowType); // true dutch girl
|
||
}
|
||
}
|
||
}
|
||
|
||
public static interface TheNether extends Land {
|
||
|
||
void onDeathClaimThisSoul(ᒢObjectShadow baptismByFire);
|
||
}
|
||
|
||
protected static <S extends ᒢObjectShadow> S deathShadow(final Object baptismByFire, final Class<S> shadow) {
|
||
return SHARED_STUDENT_SPERM_BUCKET_TOILET_CLEANER.bastardSuiker(baptismByFire, shadow);
|
||
}
|
||
}
|