text:
<?php
namespace CATIA\Commands;

use CATIA\Commands\Commands;
use Illuminate\Contracts\Bus\SelfHandling;
use CATIA\personal_info;

class DeletePersonalCommand extends Command implements SelfHandling
{
    // 'manpower_id', 'sex', 'cv_status', 'emp_status', 'bdate_month', 'bdate_day', 'bdate_year', 'age', 'bplace_city', 'bplace_province', 'bplace_region', 'educ_attain'

    public $manpower_id;

    public function __construct($manpower_id)
    {
        $this->manpower_id = $manpower_id;
    }

    public function handle()
    {
        return personal_info::where('manpower_id', $this->manpower_id)->delete();
    }
}


text:
package ca.uhn.fhir.rest.server.interceptor;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.hl7.fhir.instance.model.IBaseResource;

import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.TagList;
import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
import ca.uhn.fhir.rest.annotation.Read;
import ca.uhn.fhir.rest.annotation.Search;
import ca.uhn.fhir.rest.method.RequestDetails;
import ca.uhn.fhir.rest.server.exceptions.AuthenticationException;

/**
 * Provides methods to intercept requests and responses. Note that implementations of this interface may wish to use {@link InterceptorAdapter} in order to not need to implement every method.
 *

 * See: See the
 * server interceptor documentation
 * for more information on how to use this class.
 *

 */
public interface IServerInterceptor {

	/**
	 * This method is called before any other processing takes place for each incoming request. It may be used to provide alternate handling for some requests, or to screen requests before they are
	 * handled, etc.
	 *

	 * Note that any exceptions thrown by this method will not be trapped by HAPI (they will be passed up to the server)
	 *

	 *
	 * @param theRequest
	 *            The incoming request
	 * @param theResponse
	 *            The response. Note that interceptors may choose to provide a response (i.e. by calling {@link HttpServletResponse#getWriter()}) but in that case it is important to return
	 *            false to indicate that the server itself should not also provide a response.
	 * @return Return true if processing should continue normally. This is generally the right thing to do. If your interceptor is providing a response rather than letting HAPI handle the
	 *         response normally, you must return false. In this case, no further processing will occur and no further interceptors will be called.
	 */
	public boolean incomingRequestPreProcessed(HttpServletRequest theRequest, HttpServletResponse theResponse);

	/**
	 * This method is called just before the actual implementing server method is invoked.
	 *

	 * Note about exceptions:
	 *

	 *
	 * @param theRequestDetails
	 *            A bean containing details about the request that is about to be processed, including details such as the resource type and logical ID (if any) and other
	 *            FHIR-specific aspects of the request which have been pulled out of the {@link HttpServletRequest servlet request}.
	 * @param theRequest
	 *            The incoming request
	 * @param theResponse
	 *            The response. Note that interceptors may choose to provide a response (i.e. by calling {@link HttpServletResponse#getWriter()}) but in that case it is important to return
	 *            false to indicate that the server itself should not also provide a response.
	 * @return Return true if processing should continue normally. This is generally the right thing to do. If your interceptor is providing a response rather than letting HAPI handle the
	 *         response normally, you must return false. In this case, no further processing will occur and no further interceptors will be called.
	 * @throws AuthenticationException
	 *             This exception may be thrown to indicate that the interceptor has detected an unauthorized access attempt. If thrown, processing will stop and an HTTP 401 will be returned to the
	 *             client.
	 */
	public boolean incomingRequestPostProcessed(RequestDetails theRequestDetails, HttpServletRequest theRequest, HttpServletResponse theResponse) throws AuthenticationException;

	/**
	 * This method is called after the server implementation method has been called, but before any attempt to stream the response back to the client
	 *
	 * @param theRequestDetails
	 *            A bean containing details about the request that is about to be processed, including details such as the resource type and logical ID (if any) and other
	 *            FHIR-specific aspects of the request which have been pulled out of the {@link HttpServletRequest servlet request}.
	 * @param theResponseObject
	 *            The actual object which is being streamed to the client as a response
	 * @param theServletRequest
	 *            The incoming request
	 * @param theServletResponse
	 *            The response. Note that interceptors may choose to provide a response (i.e. by calling {@link HttpServletResponse#getWriter()}) but in that case it is important to return
	 *            false to indicate that the server itself should not also provide a response.
	 * @return Return true if processing should continue normally. This is generally the right thing to do. If your interceptor is providing a response rather than letting HAPI handle the
	 *         response normally, you must return false. In this case, no further processing will occur and no further interceptors will be called.
	 * @throws AuthenticationException
	 *             This exception may be thrown to indicate that the interceptor has detected an unauthorized access attempt. If thrown, processing will stop and an HTTP 401 will be returned to the
	 *             client.
	 */
	public boolean outgoingResponse(RequestDetails theRequestDetails, TagList theResponseObject, HttpServletRequest theServletRequest, HttpServletResponse theServletResponse)
			throws AuthenticationException;

	/**
	 * This method is called after the server implementation method has been called, but before any attempt to stream the response back to the client
	 *
	 * @param theRequestDetails
	 *            A bean containing details about the request that is about to be processed, including
	 * @param theResponseObject
	 *            The actual object which is being streamed to the client as a response
	 * @param theServletRequest
	 *            The incoming request
	 * @param theServletResponse
	 *            The response. Note that interceptors may choose to provide a response (i.e. by calling {@link HttpServletResponse#getWriter()}) but in that case it is important to return
	 *            false to indicate that the server itself should not also provide a response.
	 * @return Return true if processing should continue normally. This is generally the right thing to do. If your interceptor is providing a response rather than letting HAPI handle the
	 *         response normally, you must return false. In this case, no further processing will occur and no further interceptors will be called.
	 * @throws AuthenticationException
	 *             This exception may be thrown to indicate that the interceptor has detected an unauthorized access attempt. If thrown, processing will stop and an HTTP 401 will be returned to the
	 *             client.
	 */
	public boolean outgoingResponse(RequestDetails theRequestDetails, Bundle theResponseObject, HttpServletRequest theServletRequest, HttpServletResponse theServletResponse)
			throws AuthenticationException;

	/**
	 * This method is called after the server implementation method has been called, but before any attempt to stream the response back to the client
	 *
	 * @param theRequestDetails
	 *            A bean containing details about the request that is about to be processed, including details such as the resource type and logical ID (if any) and other
	 *            FHIR-specific aspects of the request which have been pulled out of the {@link HttpServletRequest servlet request}.
	 * @param theResponseObject
	 *            The actual object which is being streamed to the client as a response
	 * @param theServletRequest
	 *            The incoming request
	 * @param theServletResponse
	 *            The response. Note that interceptors may choose to provide a response (i.e. by calling {@link HttpServletResponse#getWriter()}) but in that case it is important to return
	 *            false to indicate that the server itself should not also provide a response.
	 * @return Return true if processing should continue normally. This is generally the right thing to do. If your interceptor is providing a response rather than letting HAPI handle the
	 *         response normally, you must return false. In this case, no further processing will occur and no further interceptors will be called.
	 * @throws AuthenticationException
	 *             This exception may be thrown to indicate that the interceptor has detected an unauthorized access attempt. If thrown, processing will stop and an HTTP 401 will be returned to the
	 *             client.
	 */
	public boolean outgoingResponse(RequestDetails theRequestDetails, IBaseResource theResponseObject, HttpServletRequest theServletRequest, HttpServletResponse theServletResponse)
			throws AuthenticationException;

	/**
	 * This method is called after the server implementation method has been called, but before any attempt to stream the response back to the client
	 *
	 * @param theRequestDetails
	 *            A bean containing details about the request that is about to be processed, including details such as the resource type and logical ID (if any) and other
	 *            FHIR-specific aspects of the request which have been pulled out of the {@link HttpServletRequest servlet request}.
	 * @param theServletRequest
	 *            The incoming request
	 * @param theServletResponse
	 *            The response. Note that interceptors may choose to provide a response (i.e. by calling {@link HttpServletResponse#getWriter()}) but in that case it is important to return
	 *            false to indicate that the server itself should not also provide a response.
	 * @return Return true if processing should continue normally. This is generally the right thing to do. If your interceptor is providing a response rather than letting HAPI handle the
	 *         response normally, you must return false. In this case, no further processing will occur and no further interceptors will be called.
	 * @throws AuthenticationException
	 *             This exception may be thrown to indicate that the interceptor has detected an unauthorized access attempt. If thrown, processing will stop and an HTTP 401 will be returned to the
	 *             client.
	 */
	public boolean outgoingResponse(RequestDetails theRequestDetails, HttpServletRequest theServletRequest, HttpServletResponse theServletResponse) throws AuthenticationException;

	/**
	 * This method is called upon any exception being thrown within the server's request processing code. This includes any exceptions thrown within resource provider methods (e.g. {@link Search} and
	 * {@link Read} methods) as well as any runtime exceptions thrown by the server itself. This also includes any {@link AuthenticationException}s thrown.
	 *

	 * Implementations of this method may choose to ignore/log/count/etc exceptions, and return true. In this case, processing will continue, and the server will automatically generate an
	 * {@link BaseOperationOutcome OperationOutcome}. Implementations may also choose to provide their own response to the client. In this case, they should return false, to indicate that
	 * they have handled the request and processing should stop.
	 *

	 *
	 *
     * @param theRequestDetails
     *            A bean containing details about the request that is about to be processed, including details such as the resource type and logical ID (if any) and other
     *            FHIR-specific aspects of the request which have been pulled out of the {@link javax.servlet.http.HttpServletRequest servlet request}. Note that the
     *            bean properties are not all guaranteed to be populated, depending on how early
     *            during processing the exception occurred.
     * @param theServletRequest
     *            The incoming request
     * @param theServletResponse
     *            The response. Note that interceptors may choose to provide a response (i.e. by calling {@link javax.servlet.http.HttpServletResponse#getWriter()}) but in that case it is important to return
     *            false to indicate that the server itself should not also provide a response.
     * @return Return true if processing should continue normally. This is generally the right thing to do. If your interceptor is providing a response rather than letting HAPI handle the
	 *         response normally, you must return false. In this case, no further processing will occur and no further interceptors will be called.
	 * @throws ServletException
	 *             If this exception is thrown, it will be re-thrown up to the container for handling.
	 * @throws IOException
	 *             If this exception is thrown, it will be re-thrown up to the container for handling.
	 */
	public boolean handleException(RequestDetails theRequestDetails, Throwable theException, HttpServletRequest theServletRequest, HttpServletResponse theServletResponse) throws ServletException,
			IOException;

}

redpajama_set_name: RedPajamaGithub


text:
using Medallion.Threading.ZooKeeper;
using NUnit.Framework;
using Medallion.Threading.Internal;

namespace Medallion.Threading.Tests.ZooKeeper;

using org.apache.zookeeper;

public class ZooKeeperConnectionTest
{
    [Test]
    public async Task TestSharesConnections()
    {
        var pool = new ZooKeeperConnection.Pool(maxAge: TimeSpan.FromSeconds(10));
        using var connection1 = await pool.ConnectAsync(GetConnectionInfo(), CancellationToken.None);
        using var connection2 = await pool.ConnectAsync(GetConnectionInfo(), CancellationToken.None);

        Assert.AreNotSame(connection1, connection2);
        Assert.AreSame(connection1.ZooKeeper, connection2.ZooKeeper);

        connection1.Dispose();
        connection2.ZooKeeper.getState().ShouldEqual(ZooKeeper.States.CONNECTED);
    }

    [Test]
    public async Task TestDoesNotShareDifferentConnections()
    {
        var pool = new ZooKeeperConnection.Pool(maxAge: TimeSpan.FromSeconds(10));
        using var connection1 = await pool.ConnectAsync(GetConnectionInfo(connectTimeout: TimeSpan.FromSeconds(30)), CancellationToken.None);
        using var connection2 = await pool.ConnectAsync(GetConnectionInfo(connectTimeout: TimeSpan.FromSeconds(20)), CancellationToken.None);

        Assert.AreNotSame(connection1, connection2);
        Assert.AreNotSame(connection1.ZooKeeper, connection2.ZooKeeper);
    }

    [Test]
    [NonParallelizable, Retry(tryCount: 3)] // timing-sensitive
    public async Task TestConnectionIsClosedAndNotSharedAfterMaxAgeElapses()
    {
        var pool = new ZooKeeperConnection.Pool(maxAge: TimeSpan.FromSeconds(2));

        using var connection1 = await pool.ConnectAsync(GetConnectionInfo(), CancellationToken.None);
        var zooKeeper1 = connection1.ZooKeeper;

        connection1.Dispose();
        Assert.IsTrue(await TestHelper.WaitForAsync(() => (zooKeeper1.getState() == ZooKeeper.States.CLOSED).AsValueTask(), TimeSpan.FromSeconds(3)));

        using var connection2 = await pool.ConnectAsync(GetConnectionInfo(), CancellationToken.None);
        Assert.AreNotSame(zooKeeper1, connection2.ZooKeeper);
    }

    [Test]
    [NonParallelizable, Retry(tryCount: 3)] // timing-sensitive
    public async Task TestConnectionCanBeHeldOpenAfterMaxAgeButDoesNotShareAndClosesAfterwards()
    {
        var pool = new ZooKeeperConnection.Pool(maxAge: TimeSpan.FromSeconds(2));

        using var connection = await pool.ConnectAsync(GetConnectionInfo(), CancellationToken.None);
        Assert.IsTrue(await TestHelper.WaitForAsync(
            async () =>
            {
                using var testConnectionInfo = await pool.ConnectAsync(GetConnectionInfo(), CancellationToken.None);
                return testConnectionInfo.ZooKeeper != connection.ZooKeeper;
            },
            TimeSpan.FromSeconds(3)
        ));

        connection.ZooKeeper.getState().ShouldEqual(ZooKeeper.States.CONNECTED);
        var zooKeeper = connection.ZooKeeper;
        connection.Dispose();
        Assert.IsTrue(await TestHelper.WaitForAsync(() => (zooKeeper.getState() != ZooKeeper.States.CONNECTED).AsValueTask(), TimeSpan.FromSeconds(1)));
    }

    [Test]
    [NonParallelizable, Retry(tryCount: 3)] // timing-sensitive
    public void TestConnectTimeout()
    {
        var pool = new ZooKeeperConnection.Pool(maxAge: TimeSpan.FromSeconds(10));
        Assert.ThrowsAsync<TimeoutException>(() => pool.ConnectAsync(GetConnectionInfo(connectTimeout: TimeSpan.Zero), CancellationToken.None));
    }

    [Test]
    public void TestThreadSafety()
    {
        var connectionInfos = Enumerable.Range(1, 3)
            .Select(i => GetConnectionInfo(connectTimeout: TimeSpan.FromSeconds(10 * i)))
            .ToArray();
        var tasks = Enumerable.Range(0, 100)
            .Select(i => Task.Run(async () =>
            {
                using var connection = await ZooKeeperConnection.DefaultPool.ConnectAsync(connectionInfos[i % connectionInfos.Length], CancellationToken.None);
                await connection.ZooKeeper.existsAsync("/zookeeper");
                await Task.Delay(1);
                await connection.ZooKeeper.existsAsync($"/{Guid.NewGuid()}");
            }))
            .ToArray();
        Assert.DoesNotThrow(() => Task.WaitAll(tasks));
    }

    private static ZooKeeperConnectionInfo GetConnectionInfo(TimeoutValue? connectTimeout = null) =>
        new ZooKeeperConnectionInfo(
            ZooKeeperPorts.DefaultConnectionString,
            ConnectTimeout: connectTimeout ?? TimeSpan.FromSeconds(30),
            SessionTimeout: TimeSpan.FromSeconds(30),
            new EquatableReadOnlyList<ZooKeeperAuthInfo>(Array.Empty<ZooKeeperAuthInfo>())
        );
}


text:
from __future__ import print_function

from fuf import ActionSet

def test_realworld():
    # Create a simple action set
    action = ActionSet()

    # Full decorator
    # Nothing is gathered implicitly
    @action("help", "List command help")
    def action_help(*args):
        "List command help"
        if args:
            for arg in args:
                if arg in action:
                    print("{0.name}:\t{0.helpmsg}".format(action[arg]))
        else:
            print("Available commands:", ", ".join(a for a in action))

    # Partially applied
    # The name is specified, but the help is pulled from the docstring
    @action("verify")
    def action_verify():
        "Confirm access"
        print("Authentication valid")

    # Implicit
    # The name of the command and the help are pulled from
    # the function name and docstring
    @action
    def say(*args):
        "Say a message"
        print(" ".join(args))

def test_basic():
    action = ActionSet()

    @action
    def add(x, y):
        return float(x) + float(y)

    @action
    def sub(x, y):
        return float(x) - float(y)

    assert action.perform("sub 2 5") == -3, "Basic subtraction failed"

def test_env():
    action = ActionSet()

    @action
    def add(data, x):
        return data["x"] + int(x)

    data = {}
    data["x"] = 10
    assert action.perform("add 5", data) == 15, "Environment failed"
    data["x"] = 5
    assert action.perform("add 5", data) == 10, "Environment updating failed"


text:
<?php

declare(strict_types = 1);

namespace UnitConverter\Calculator\Formula\FuelEconomy\KilometrePerLitre;

use UnitConverter\Calculator\Formula\AbstractFormula;

/**
 * Formula to convert Kilometre Per Litre values to Litre Per 100 Kilometres.
 *
 * @version 1.0.0
 * @author Maksim Martianov <7222812+maksimru@users.noreply.github.com>
 */
class ToLitrePer100Kilometres extends AbstractFormula
{
    const FORMULA_STRING = 'L/100km = 100 / km/l';

    const FORMULA_TEMPLATE = '%s L/100km = 100 / %skm/l';

    /**
     * {@inheritDoc}
     */
    public function describe($value, $fromUnits, $toUnits, int $precision = null)
    {
        // XXX: this formula assumes all calculators can accept strings, as it's the safest type.
        $addResult = $this->calculator->div(100, $value);
        $result = $this->calculator->round($addResult, $precision);

        $this->plugVariables($result, $value);

        return $result;
    }
}


text:
package org.auraframework.test.page;

import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;

import org.auraframework.test.util.AuraUITestingUtil;
import org.auraframework.test.util.AuraUITestingUtil.ActionDuringTransit;
import org.auraframework.test.util.AuraUITestingUtil.ActionTiming;
import org.auraframework.test.util.AuraUITestingUtil.StressAction;
/**
 * this is an example for testing UI with PageObject pattern.
 * for more info about the PageObject 'idea': https://code.google.com/p/selenium/wiki/PageObjects
 */
public class SamplePageObjectUITest extends PageObjectTestCase<SampleAuraPageObject> {

    public SamplePageObjectUITest(String name) throws MalformedURLException, URISyntaxException {
        super(name);
    }

    public void testButtonUi() throws Exception {
        //create the PageObject
        SampleAuraPageObject sapo = new SampleAuraPageObject(this.getName(), true, "uiExamples:buttonExample", this);
        //PageObject is in charge of load itself, clicking , typing , etc
        sapo.open();
        sapo.clickOnButton();
        String outputText = sapo.getOutputText();//page().getOutputText();

        //Test case is in charge of assertion.
        //we didn't input anything into inputText, so it's undefined.
        assertEquals("get different text!","Hi, undefined",outputText);
    }

    public void testProxy() throws MalformedURLException, URISyntaxException {
    	final SampleAuraPageObject sapo1 = new SampleAuraPageObject(this.getName(), true, "actionsTest:serverAction", this);
    	//we want to drop action "executeInForeground" right before it get send to server, the Page Object function that
    	//send the action is "clickOnButton"
    	String methodWeWantToIntercept = "clickOnButton";
    	String auraActionWeCare = "executeInForeground";
    	StressAction stressAction = AuraUITestingUtil.createStressAction(auraActionWeCare, ActionTiming.PRESEND, ActionDuringTransit.DROPACTION);
    	Map<String, StressAction> methodNameToStressActionMap = new HashMap<>();
    	methodNameToStressActionMap.put(methodWeWantToIntercept, stressAction);
    	AuraPageObjectInterface apoi = AuraPageObjectHandler.getAuraPageObjectInterface(sapo1, methodNameToStressActionMap);
    	//now do the test
    	apoi.open();
    	apoi.clickOnButton();
    }

}


text:
<?php

namespace PHPExiftool\Driver\Tag\EXE;

use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;

/**
 * @ExclusionPolicy("all")
 */
class LegalTrademarks extends AbstractTag
{

    protected $Id = 'LegalTrademarks';

    protected $Name = 'LegalTrademarks';

    protected $FullName = 'EXE::PEString';

    protected $GroupName = 'EXE';

    protected $g0 = 'EXE';

    protected $g1 = 'EXE';

    protected $g2 = 'Other';

    protected $Type = '?';

    protected $Writable = false;

    protected $Description = 'Legal Trademarks';

}


text:
package org.docksidestage.dbflute.bsentity;

import java.util.List;
import java.util.ArrayList;

import org.dbflute.Entity;
import org.dbflute.dbmeta.DBMeta;
import org.dbflute.dbmeta.AbstractEntity;
import org.dbflute.dbmeta.accessory.DomainEntity;
import org.dbflute.optional.OptionalEntity;
import org.docksidestage.dbflute.allcommon.EntityDefinedCommonColumn;
import org.docksidestage.dbflute.allcommon.DBMetaInstanceHandler;
import org.docksidestage.dbflute.allcommon.CDef;
import org.docksidestage.dbflute.exentity.*;

/**
 * The entity of (会員退会情報)MEMBER_WITHDRAWAL as TABLE.

 * 退会会員の退会に関する詳細な情報。

 * 退会会員のみデータが存在し、"1 : 0..1" のパターンの one-to-one である。

 * 共通カラムがあってバージョンNOがないパターン。

 * 基本的に更新は入らないが、重要なデータなので万が一のために更新系の共通カラムも。
 *

 * [primary-key]
 *     MEMBER_ID
 *
 * [column]
 *     MEMBER_ID, WITHDRAWAL_REASON_CODE, WITHDRAWAL_REASON_INPUT_TEXT, WITHDRAWAL_DATETIME, REGISTER_DATETIME, REGISTER_USER, UPDATE_DATETIME, UPDATE_USER
 *
 * [sequence]
 *
 *
 * [identity]
 *
 *
 * [version-no]
 *
 *
 * [foreign table]
 *     MEMBER, WITHDRAWAL_REASON
 *
 * [referrer table]
 *
 *
 * [foreign property]
 *     member, withdrawalReason
 *
 * [referrer property]
 *
 *
 * [get/set template]
 * /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
 * Integer memberId = entity.getMemberId();
 * String withdrawalReasonCode = entity.getWithdrawalReasonCode();
 * String withdrawalReasonInputText = entity.getWithdrawalReasonInputText();
 * java.time.LocalDateTime withdrawalDatetime = entity.getWithdrawalDatetime();
 * java.time.LocalDateTime registerDatetime = entity.getRegisterDatetime();
 * String registerUser = entity.getRegisterUser();
 * java.time.LocalDateTime updateDatetime = entity.getUpdateDatetime();
 * String updateUser = entity.getUpdateUser();
 * entity.setMemberId(memberId);
 * entity.setWithdrawalReasonCode(withdrawalReasonCode);
 * entity.setWithdrawalReasonInputText(withdrawalReasonInputText);
 * entity.setWithdrawalDatetime(withdrawalDatetime);
 * entity.setRegisterDatetime(registerDatetime);
 * entity.setRegisterUser(registerUser);
 * entity.setUpdateDatetime(updateDatetime);
 * entity.setUpdateUser(updateUser);
 * = = = = = = = = = =/
 *

 * @author DBFlute(AutoGenerator)
 */
public abstract class BsMemberWithdrawal extends AbstractEntity implements DomainEntity, EntityDefinedCommonColumn {

    // ===================================================================================
    //                                                                          Definition
    //                                                                          ==========
    /** The serial version UID for object serialization. (Default) */
    private static final long serialVersionUID = 1L;

    // ===================================================================================
    //                                                                           Attribute
    //                                                                           =========
    /** MEMBER_ID: {PK, NotNull, INTEGER(10), FK to MEMBER} */
    protected Integer _memberId;

    /** (退会理由コード)WITHDRAWAL_REASON_CODE: {IX, CHAR(3), FK to WITHDRAWAL_REASON, classification=WithdrawalReason} */
    protected String _withdrawalReasonCode;

    /** (退会理由入力テキスト)WITHDRAWAL_REASON_INPUT_TEXT: {CLOB(2147483647)} */
    protected String _withdrawalReasonInputText;

    /** (退会日時)WITHDRAWAL_DATETIME: {NotNull, TIMESTAMP(26, 6)} */
    protected java.time.LocalDateTime _withdrawalDatetime;

    /** REGISTER_DATETIME: {NotNull, TIMESTAMP(26, 6)} */
    protected java.time.LocalDateTime _registerDatetime;

    /** REGISTER_USER: {NotNull, VARCHAR(200)} */
    protected String _registerUser;

    /** UPDATE_DATETIME: {NotNull, TIMESTAMP(26, 6)} */
    protected java.time.LocalDateTime _updateDatetime;

    /** UPDATE_USER: {NotNull, VARCHAR(200)} */
    protected String _updateUser;

    // ===================================================================================
    //                                                                             DB Meta
    //                                                                             =======
    /** {@inheritDoc} */
    public DBMeta asDBMeta() {
        return DBMetaInstanceHandler.findDBMeta(asTableDbName());
    }

    /** {@inheritDoc} */
    public String asTableDbName() {
        return "MEMBER_WITHDRAWAL";
    }

    // ===================================================================================
    //                                                                        Key Handling
    //                                                                        ============
    /** {@inheritDoc} */
    public boolean hasPrimaryKeyValue() {
        if (_memberId == null) { return false; }
        return true;
    }

    // ===================================================================================
    //                                                             Classification Property
    //                                                             =======================
    /**
     * Get the value of withdrawalReasonCode as the classification of WithdrawalReason.

     * (退会理由コード)WITHDRAWAL_REASON_CODE: {IX, CHAR(3), FK to WITHDRAWAL_REASON, classification=WithdrawalReason}

     * reason for member withdrawal
     *
It's treated as case insensitive and if the code value is null, it returns null.

     * @return The instance of classification definition (as ENUM type). (NullAllowed: when the column value is null)
     */
    public CDef.WithdrawalReason getWithdrawalReasonCodeAsWithdrawalReason() {
        return CDef.WithdrawalReason.codeOf(getWithdrawalReasonCode());
    }

    /**
     * Set the value of withdrawalReasonCode as the classification of WithdrawalReason.

     * (退会理由コード)WITHDRAWAL_REASON_CODE: {IX, CHAR(3), FK to WITHDRAWAL_REASON, classification=WithdrawalReason}

     * reason for member withdrawal
     * @param cdef The instance of classification definition (as ENUM type). (NullAllowed: if null, null value is set to the column)
     */
    public void setWithdrawalReasonCodeAsWithdrawalReason(CDef.WithdrawalReason cdef) {
        setWithdrawalReasonCode(cdef != null ? cdef.code() : null);
    }

    // ===================================================================================
    //                                                              Classification Setting
    //                                                              ======================
    /**
     * Set the value of withdrawalReasonCode as Sit (SIT).

     * SIT: site is not kindness
     */
    public void setWithdrawalReasonCode_Sit() {
        setWithdrawalReasonCodeAsWithdrawalReason(CDef.WithdrawalReason.Sit);
    }

    /**
     * Set the value of withdrawalReasonCode as Prd (PRD).

     * PRD: no attractive product
     */
    public void setWithdrawalReasonCode_Prd() {
        setWithdrawalReasonCodeAsWithdrawalReason(CDef.WithdrawalReason.Prd);
    }

    /**
     * Set the value of withdrawalReasonCode as Frt (FRT).

     * FRT: because of furiten
     */
    public void setWithdrawalReasonCode_Frt() {
        setWithdrawalReasonCodeAsWithdrawalReason(CDef.WithdrawalReason.Frt);
    }

    /**
     * Set the value of withdrawalReasonCode as Oth (OTH).

     * OTH: other reasons
     */
    public void setWithdrawalReasonCode_Oth() {
        setWithdrawalReasonCodeAsWithdrawalReason(CDef.WithdrawalReason.Oth);
    }

    // ===================================================================================
    //                                                        Classification Determination
    //                                                        ============================
    /**
     * Is the value of withdrawalReasonCode Sit?

     * SIT: site is not kindness
     *
It's treated as case insensitive and if the code value is null, it returns false.

     * @return The determination, true or false.
     */
    public boolean isWithdrawalReasonCodeSit() {
        CDef.WithdrawalReason cdef = getWithdrawalReasonCodeAsWithdrawalReason();
        return cdef != null ? cdef.equals(CDef.WithdrawalReason.Sit) : false;
    }

    /**
     * Is the value of withdrawalReasonCode Prd?

     * PRD: no attractive product
     *
It's treated as case insensitive and if the code value is null, it returns false.

     * @return The determination, true or false.
     */
    public boolean isWithdrawalReasonCodePrd() {
        CDef.WithdrawalReason cdef = getWithdrawalReasonCodeAsWithdrawalReason();
        return cdef != null ? cdef.equals(CDef.WithdrawalReason.Prd) : false;
    }

    /**
     * Is the value of withdrawalReasonCode Frt?

     * FRT: because of furiten
     *
It's treated as case insensitive and if the code value is null, it returns false.

     * @return The determination, true or false.
     */
    public boolean isWithdrawalReasonCodeFrt() {
        CDef.WithdrawalReason cdef = getWithdrawalReasonCodeAsWithdrawalReason();
        return cdef != null ? cdef.equals(CDef.WithdrawalReason.Frt) : false;
    }

    /**
     * Is the value of withdrawalReasonCode Oth?

     * OTH: other reasons
     *
It's treated as case insensitive and if the code value is null, it returns false.

     * @return The determination, true or false.
     */
    public boolean isWithdrawalReasonCodeOth() {
        CDef.WithdrawalReason cdef = getWithdrawalReasonCodeAsWithdrawalReason();
        return cdef != null ? cdef.equals(CDef.WithdrawalReason.Oth) : false;
    }

    // ===================================================================================
    //                                                                    Foreign Property
    //                                                                    ================
    /** (会員)MEMBER by my MEMBER_ID, named 'member'. */
    protected OptionalEntity<Member> _member;

    /**
     * [get] (会員)MEMBER by my MEMBER_ID, named 'member'.

     * Optional: alwaysPresent(), ifPresent().orElse(), get(), ...
     * @return The entity of foreign property 'member'. (NotNull, EmptyAllowed: when e.g. null FK column, no setupSelect)
     */
    public OptionalEntity<Member> getMember() {
        if (_member == null) { _member = OptionalEntity.relationEmpty(this, "member"); }
        return _member;
    }

    /**
     * [set] (会員)MEMBER by my MEMBER_ID, named 'member'.
     * @param member The entity of foreign property 'member'. (NullAllowed)
     */
    public void setMember(OptionalEntity<Member> member) {
        _member = member;
    }

    /** (退会理由)WITHDRAWAL_REASON by my WITHDRAWAL_REASON_CODE, named 'withdrawalReason'. */
    protected OptionalEntity<WithdrawalReason> _withdrawalReason;

    /**
     * [get] (退会理由)WITHDRAWAL_REASON by my WITHDRAWAL_REASON_CODE, named 'withdrawalReason'.

     * Optional: alwaysPresent(), ifPresent().orElse(), get(), ...
     * @return The entity of foreign property 'withdrawalReason'. (NotNull, EmptyAllowed: when e.g. null FK column, no setupSelect)
     */
    public OptionalEntity<WithdrawalReason> getWithdrawalReason() {
        if (_withdrawalReason == null) { _withdrawalReason = OptionalEntity.relationEmpty(this, "withdrawalReason"); }
        return _withdrawalReason;
    }

    /**
     * [set] (退会理由)WITHDRAWAL_REASON by my WITHDRAWAL_REASON_CODE, named 'withdrawalReason'.
     * @param withdrawalReason The entity of foreign property 'withdrawalReason'. (NullAllowed)
     */
    public void setWithdrawalReason(OptionalEntity<WithdrawalReason> withdrawalReason) {
        _withdrawalReason = withdrawalReason;
    }

    // ===================================================================================
    //                                                                   Referrer Property
    //                                                                   =================
    protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import
        return new ArrayList<ELEMENT>();
    }

    // ===================================================================================
    //                                                                      Basic Override
    //                                                                      ==============
    @Override
    protected boolean doEquals(Object obj) {
        if (obj instanceof BsMemberWithdrawal) {
            BsMemberWithdrawal other = (BsMemberWithdrawal)obj;
            if (!xSV(_memberId, other._memberId)) { return false; }
            return true;
        } else {
            return false;
        }
    }

    @Override
    protected int doHashCode(int initial) {
        int hs = initial;
        hs = xCH(hs, asTableDbName());
        hs = xCH(hs, _memberId);
        return hs;
    }

    @Override
    protected String doBuildStringWithRelation(String li) {
        StringBuilder sb = new StringBuilder();
        if (_member != null && _member.isPresent())
        { sb.append(li).append(xbRDS(_member, "member")); }
        if (_withdrawalReason != null && _withdrawalReason.isPresent())
        { sb.append(li).append(xbRDS(_withdrawalReason, "withdrawalReason")); }
        return sb.toString();
    }
    protected <ET extends Entity> String xbRDS(org.dbflute.optional.OptionalEntity<ET> et, String name) { // buildRelationDisplayString()
        return et.get().buildDisplayString(name, true, true);
    }

    @Override
    protected String doBuildColumnString(String dm) {
        StringBuilder sb = new StringBuilder();
        sb.append(dm).append(xfND(_memberId));
        sb.append(dm).append(xfND(_withdrawalReasonCode));
        sb.append(dm).append(xfND(_withdrawalReasonInputText));
        sb.append(dm).append(xfND(_withdrawalDatetime));
        sb.append(dm).append(xfND(_registerDatetime));
        sb.append(dm).append(xfND(_registerUser));
        sb.append(dm).append(xfND(_updateDatetime));
        sb.append(dm).append(xfND(_updateUser));
        if (sb.length() > dm.length()) {
            sb.delete(0, dm.length());
        }
        sb.insert(0, "{").append("}");
        return sb.toString();
    }

    @Override
    protected String doBuildRelationString(String dm) {
        StringBuilder sb = new StringBuilder();
        if (_member != null && _member.isPresent())
        { sb.append(dm).append("member"); }
        if (_withdrawalReason != null && _withdrawalReason.isPresent())
        { sb.append(dm).append("withdrawalReason"); }
        if (sb.length() > dm.length()) {
            sb.delete(0, dm.length()).insert(0, "(").append(")");
        }
        return sb.toString();
    }

    @Override
    public MemberWithdrawal clone() {
        return (MemberWithdrawal)super.clone();
    }

    // ===================================================================================
    //                                                                            Accessor
    //                                                                            ========
    /**
     * [get] MEMBER_ID: {PK, NotNull, INTEGER(10), FK to MEMBER}

     * @return The value of the column 'MEMBER_ID'. (basically NotNull if selected: for the constraint)
     */
    public Integer getMemberId() {
        checkSpecifiedProperty("memberId");
        return _memberId;
    }

    /**
     * [set] MEMBER_ID: {PK, NotNull, INTEGER(10), FK to MEMBER}

     * @param memberId The value of the column 'MEMBER_ID'. (basically NotNull if update: for the constraint)
     */
    public void setMemberId(Integer memberId) {
        registerModifiedProperty("memberId");
        _memberId = memberId;
    }

    /**
     * [get] (退会理由コード)WITHDRAWAL_REASON_CODE: {IX, CHAR(3), FK to WITHDRAWAL_REASON, classification=WithdrawalReason}

     * 定型的な退会した理由を参照するコード。

     * 何も言わずに退会する会員もいるので必須項目ではない。
     * @return The value of the column 'WITHDRAWAL_REASON_CODE'. (NullAllowed even if selected: for no constraint)
     */
    public String getWithdrawalReasonCode() {
        checkSpecifiedProperty("withdrawalReasonCode");
        return convertEmptyToNull(_withdrawalReasonCode);
    }

    /**
     * [set] (退会理由コード)WITHDRAWAL_REASON_CODE: {IX, CHAR(3), FK to WITHDRAWAL_REASON, classification=WithdrawalReason}

     * 定型的な退会した理由を参照するコード。

     * 何も言わずに退会する会員もいるので必須項目ではない。
     * @param withdrawalReasonCode The value of the column 'WITHDRAWAL_REASON_CODE'. (NullAllowed: null update allowed for no constraint)
     */
    protected void setWithdrawalReasonCode(String withdrawalReasonCode) {
        checkClassificationCode("WITHDRAWAL_REASON_CODE", CDef.DefMeta.WithdrawalReason, withdrawalReasonCode);
        registerModifiedProperty("withdrawalReasonCode");
        _withdrawalReasonCode = withdrawalReasonCode;
    }

    /**
     * [get] (退会理由入力テキスト)WITHDRAWAL_REASON_INPUT_TEXT: {CLOB(2147483647)}

     * 会員がフリーテキストで入力できる退会理由。

     * もう言いたいこと言ってもらう感じ。サイト運営側としてはこういうのは真摯に受け止めて改善していきたいところ。
     * @return The value of the column 'WITHDRAWAL_REASON_INPUT_TEXT'. (NullAllowed even if selected: for no constraint)
     */
    public String getWithdrawalReasonInputText() {
        checkSpecifiedProperty("withdrawalReasonInputText");
        return convertEmptyToNull(_withdrawalReasonInputText);
    }

    /**
     * [set] (退会理由入力テキスト)WITHDRAWAL_REASON_INPUT_TEXT: {CLOB(2147483647)}

     * 会員がフリーテキストで入力できる退会理由。

     * もう言いたいこと言ってもらう感じ。サイト運営側としてはこういうのは真摯に受け止めて改善していきたいところ。
     * @param withdrawalReasonInputText The value of the column 'WITHDRAWAL_REASON_INPUT_TEXT'. (NullAllowed: null update allowed for no constraint)
     */
    public void setWithdrawalReasonInputText(String withdrawalReasonInputText) {
        registerModifiedProperty("withdrawalReasonInputText");
        _withdrawalReasonInputText = withdrawalReasonInputText;
    }

    /**
     * [get] (退会日時)WITHDRAWAL_DATETIME: {NotNull, TIMESTAMP(26, 6)}

     * 退会した瞬間の日時。

     * 正式会員日時と違い、こっちは one-to-one の別テーブルで管理されている。
     * @return The value of the column 'WITHDRAWAL_DATETIME'. (basically NotNull if selected: for the constraint)
     */
    public java.time.LocalDateTime getWithdrawalDatetime() {
        checkSpecifiedProperty("withdrawalDatetime");
        return _withdrawalDatetime;
    }

    /**
     * [set] (退会日時)WITHDRAWAL_DATETIME: {NotNull, TIMESTAMP(26, 6)}

     * 退会した瞬間の日時。

     * 正式会員日時と違い、こっちは one-to-one の別テーブルで管理されている。
     * @param withdrawalDatetime The value of the column 'WITHDRAWAL_DATETIME'. (basically NotNull if update: for the constraint)
     */
    public void setWithdrawalDatetime(java.time.LocalDateTime withdrawalDatetime) {
        registerModifiedProperty("withdrawalDatetime");
        _withdrawalDatetime = withdrawalDatetime;
    }

    /**
     * [get] REGISTER_DATETIME: {NotNull, TIMESTAMP(26, 6)}

     * @return The value of the column 'REGISTER_DATETIME'. (basically NotNull if selected: for the constraint)
     */
    public java.time.LocalDateTime getRegisterDatetime() {
        checkSpecifiedProperty("registerDatetime");
        return _registerDatetime;
    }

    /**
     * [set] REGISTER_DATETIME: {NotNull, TIMESTAMP(26, 6)}

     * @param registerDatetime The value of the column 'REGISTER_DATETIME'. (basically NotNull if update: for the constraint)
     */
    public void setRegisterDatetime(java.time.LocalDateTime registerDatetime) {
        registerModifiedProperty("registerDatetime");
        _registerDatetime = registerDatetime;
    }

    /**
     * [get] REGISTER_USER: {NotNull, VARCHAR(200)}

     * @return The value of the column 'REGISTER_USER'. (basically NotNull if selected: for the constraint)
     */
    public String getRegisterUser() {
        checkSpecifiedProperty("registerUser");
        return convertEmptyToNull(_registerUser);
    }

    /**
     * [set] REGISTER_USER: {NotNull, VARCHAR(200)}

     * @param registerUser The value of the column 'REGISTER_USER'. (basically NotNull if update: for the constraint)
     */
    public void setRegisterUser(String registerUser) {
        registerModifiedProperty("registerUser");
        _registerUser = registerUser;
    }

    /**
     * [get] UPDATE_DATETIME: {NotNull, TIMESTAMP(26, 6)}

     * @return The value of the column 'UPDATE_DATETIME'. (basically NotNull if selected: for the constraint)
     */
    public java.time.LocalDateTime getUpdateDatetime() {
        checkSpecifiedProperty("updateDatetime");
        return _updateDatetime;
    }

    /**
     * [set] UPDATE_DATETIME: {NotNull, TIMESTAMP(26, 6)}

     * @param updateDatetime The value of the column 'UPDATE_DATETIME'. (basically NotNull if update: for the constraint)
     */
    public void setUpdateDatetime(java.time.LocalDateTime updateDatetime) {
        registerModifiedProperty("updateDatetime");
        _updateDatetime = updateDatetime;
    }

    /**
     * [get] UPDATE_USER: {NotNull, VARCHAR(200)}

     * @return The value of the column 'UPDATE_USER'. (basically NotNull if selected: for the constraint)
     */
    public String getUpdateUser() {
        checkSpecifiedProperty("updateUser");
        return convertEmptyToNull(_updateUser);
    }

    /**
     * [set] UPDATE_USER: {NotNull, VARCHAR(200)}

     * @param updateUser The value of the column 'UPDATE_USER'. (basically NotNull if update: for the constraint)
     */
    public void setUpdateUser(String updateUser) {
        registerModifiedProperty("updateUser");
        _updateUser = updateUser;
    }

    /**
     * For framework so basically DON'T use this method.
     * @param withdrawalReasonCode The value of the column 'WITHDRAWAL_REASON_CODE'. (NullAllowed: null update allowed for no constraint)
     */
    public void mynativeMappingWithdrawalReasonCode(String withdrawalReasonCode) {
        setWithdrawalReasonCode(withdrawalReasonCode);
    }
}


text: {{title}}


text:
package reactor.test.subscriber;

import java.util.function.Predicate;

import org.reactivestreams.Subscription;

import reactor.core.Fuseable;
import reactor.util.context.Context;
import reactor.util.context.ContextView;

/**
 * A configuration builder used to create a fine-tuned {@link TestSubscriber}, also
 * allowing for a {@link reactor.core.Fuseable.ConditionalSubscriber} variant.
 * Notably, it allows the created instance to enforce fusion compatibility
 * (by assuming a {@link Fuseable} source publisher and expecting a
 * {@link reactor.core.Fuseable.QueueSubscription}).
 *

 * See {@link TestSubscriber#builder()} to obtain a new builder.
 *

 * Note that all methods mutate the builder configuration, so reuse is discouraged.
 *
 * @author Simon Baslé
 */
public final class TestSubscriberBuilder {

	long                             initialRequest;
	Context                                 context;
	TestSubscriber.FusionRequirement fusionRequirement;
	int                                     requestedFusionMode;
	int                              expectedFusionMode;

	TestSubscriberBuilder() {
		this.initialRequest = Long.MAX_VALUE;
		this.context = Context.empty();
		this.fusionRequirement = TestSubscriber.FusionRequirement.NONE;
		this.requestedFusionMode = Fuseable.NONE;
		this.expectedFusionMode = Fuseable.NONE;
	}

	/**
	 * Enrich the {@link Context} with a single entry.
	 *
	 * @param key the key to put/set in the {@link Context} of the future {@link TestSubscriber}
	 * @param value the value to associate with the key
	 * @return this builder, mutated to have the key/value pair added to the {@link Context}
	 */
	public TestSubscriberBuilder contextPut(Object key, Object value) {
		this.context = context.put(key, value);
		return this;
	}

	/**
	 * Enrich the {@link Context} by putting all entries of the given {@link ContextView} in it.
	 *
	 * @param toAdd the {@link ContextView} to add to the {@link Context} of the future {@link TestSubscriber}
	 * @return this builder, mutated to have all {@link ContextView}'s key/value pairs added to the {@link Context}
	 */
	public TestSubscriberBuilder contextPutAll(ContextView toAdd) {
		this.context = context.putAll(toAdd);
		return this;
	}

	/**
	 * Set the request to be made upon receiving the {@link org.reactivestreams.Subscription}
	 * in {@link org.reactivestreams.Subscriber#onSubscribe(Subscription)}. Default is {@link Long#MAX_VALUE}.
	 *
	 * @param initialRequest the request to be made at subscription
	 * @return this builder, mutated to reflect the new request to be made at subscription
	 */
	public TestSubscriberBuilder initialRequest(long initialRequest) {
		this.initialRequest = initialRequest;
		return this;
	}

	/**
	 * Set the request to be made upon receiving the {@link org.reactivestreams.Subscription}
	 * in {@link org.reactivestreams.Subscriber#onSubscribe(Subscription)} to be an
	 * unbounded request, ie. {@link Long#MAX_VALUE}.
	 *
	 * @return this builder, mutated to reflect an unbounded request is to be made at subscription
	 */
	public TestSubscriberBuilder initialRequestUnbounded() {
		this.initialRequest = Long.MAX_VALUE;
		return this;
	}

	/**
	 * Expect fusion to be possible with the {@link TestSubscriber}, with {@link Fuseable#NONE}) being a special case.
	 * Fusion will be negotiated at subscription, enforcing the need for a {@link reactor.core.Fuseable.QueueSubscription} to be passed.
	 * Furthermore, the fusion mode returned from the negotiation with the {@link reactor.core.Fuseable.QueueSubscription}
	 * is expected to be the same as the provided mode.
	 *

	 * Use {@code requireFusion(Fuseable.NONE)} to remove any previously fusion requirement, as well as
	 * removing type enforcement on the subscription (a vanilla {@link Subscription} becomes acceptable).
	 * Use {@link #requireNotFuseable()} to strictly enforce that the {@link Subscription} MUST NOT be a {@link reactor.core.Fuseable.QueueSubscription}.
	 *
	 * @param exactMode the requested fusion mode, expected in return from the negotiation with the {@link reactor.core.Fuseable.QueueSubscription}
	 * @return this builder, mutated to require fusion with the given mode
	 */
	public TestSubscriberBuilder requireFusion(int exactMode) {
		return requireFusion(exactMode, exactMode);
	}

	/**
	 * Expect fusion to be possible with the {@link TestSubscriber}, with both parameters set to {@link Fuseable#NONE} being a special case.
	 * Fusion will be negotiated at subscription, enforcing the need for a {@link reactor.core.Fuseable.QueueSubscription} to be passed.
	 * Furthermore, the {@code negotiatedMode} is expected to be negotiated by the subscription
	 * in response to requesting {@code requestedMode}.
	 *

	 * Use {@code requireFusion(Fuseable.NONE, Fuseable.NONE)} to remove any previously fusion requirement, as well as
	 * removing type enforcement on the subscription (a vanilla {@link Subscription} becomes acceptable).
	 * Use {@link #requireNotFuseable()} to strictly enforce that the {@link Subscription} MUST NOT be a {@link reactor.core.Fuseable.QueueSubscription}.
	 *
	 * @param requestedMode the fusion mode requested to the {@link reactor.core.Fuseable.QueueSubscription}
	 * @param negotiatedMode the fusion mode expected from the negotiation with the {@link reactor.core.Fuseable.QueueSubscription}
	 * @return this builder, mutated to require fusion with the given negotiated mode (in response to the given requested mode)
	 */
	public TestSubscriberBuilder requireFusion(int requestedMode, int negotiatedMode) {
		if (requestedMode == negotiatedMode && negotiatedMode == Fuseable.NONE) {
			this.fusionRequirement = TestSubscriber.FusionRequirement.NONE;
		}
		else {
			this.fusionRequirement = TestSubscriber.FusionRequirement.FUSEABLE;
		}
		this.requestedFusionMode = requestedMode;
		this.expectedFusionMode = negotiatedMode;
		return this;
	}

	/**
	 * Enforce that the {@link Subscription} passed to the {@link TestSubscriber} isn't a {@link reactor.core.Fuseable.QueueSubscription}.
	 * This is stricter than {@code requireFusion(Fuseable.NONE, Fuseable.NONE)}, which merely disables fusion but still accepts
	 * the incoming subscription to be a QueueSubscription.
	 *
	 * @return this builder, mutated to reject all {@link reactor.core.Fuseable.QueueSubscription}
	 */
	public TestSubscriberBuilder requireNotFuseable() {
		this.fusionRequirement = TestSubscriber.FusionRequirement.NOT_FUSEABLE;
		this.requestedFusionMode = Fuseable.NONE;
		this.expectedFusionMode = Fuseable.NONE;
		return this;
	}

	/**
	 * Create a {@link reactor.core.Fuseable.ConditionalSubscriber} variant of {@link TestSubscriber} according
	 * to this builder.
	 * The provided {@link Predicate} will be used as the implementation
	 * of {@link reactor.core.Fuseable.ConditionalSubscriber#tryOnNext(Object)}.
	 *
	 * @param tryOnNext the {@link Predicate} to use as the {@link reactor.core.Fuseable.ConditionalSubscriber#tryOnNext tryOnNext} implementation
	 * @param <T> the type of elements received by the {@link TestSubscriber}, defined by the predicate
	 * @return a {@link ConditionalTestSubscriber}
	 */
	public <T> ConditionalTestSubscriber<T> buildConditional(Predicate<? super T> tryOnNext) {
		return new DefaultConditionalTestSubscriber<T>(this, tryOnNext);
	}

	/**
	 * Create a {@link TestSubscriber} according to this builder.
	 *
	 * @param <T> the type of elements to be received by the subscriber
	 * @return a new plain {@link TestSubscriber}
	 */
	public <T> TestSubscriber<T> build() {
		return new DefaultTestSubscriber<>(this);
	}
}


text:
package engsoft;

/**
 * Classe que engloba os estados dos componentes de hardware.
 */
public class EstadoHardware {

    public static final EstadoHardware ehJarraNaoVazia =          new EstadoHardware(0);
    public static final EstadoHardware ehJarraVazia =             new EstadoHardware(1);
    public static final EstadoHardware ehPlacaVazia =             new EstadoHardware(2);
    public static final EstadoHardware ehEbulidorVazio =          new EstadoHardware(3);
    public static final EstadoHardware ehEbulidorNaoVazio =       new EstadoHardware(4);
    public static final EstadoHardware ehInterruptorPressionado = new EstadoHardware(5);
    public static final EstadoHardware ehInterruptorSolto =       new EstadoHardware(6);
    public static final EstadoHardware ehEbulidorLigado =         new EstadoHardware(7);
    public static final EstadoHardware ehEbulidorDesligado =      new EstadoHardware(8);
    public static final EstadoHardware ehAquecedorLigado =        new EstadoHardware(9);
    public static final EstadoHardware ehAquecedorDesligado =     new EstadoHardware(10);
    public static final EstadoHardware ehIndicadoraLigada =       new EstadoHardware(11);
    public static final EstadoHardware ehIndicadoraDesligada =    new EstadoHardware(12);
    public static final EstadoHardware ehValvulaAberta =          new EstadoHardware(13);
    public static final EstadoHardware ehValvulaFechada =         new EstadoHardware(14);

    private int id;

    private EstadoHardware(int id) {
        this.id = id;
    }

    public boolean equals(Object obj) {
        return (obj != null) && (obj instanceof EstadoHardware)
                && ((EstadoHardware) obj).id == id;
    }
}