/**
 * Copyright 2011 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package moontime;

/**
 * A {@link MoonPhase} but with a single date assignable.
 */
public enum MoonEventType {

    NEW_MOON(0.0d), FIRST_QUARTER(0.25d), FULL_MOON(0.5d), LAST_QUARTER(0.75d);

    private final double _fraction;

    private MoonEventType(double fraction) {
        _fraction = fraction;
    }

    /**
     * @return value between 0..1
     */
    public double getFraction() {
        return _fraction;
    }

    public String getDisplayName() {
        char[] chars = name().toCharArray();
        StringBuilder displayName = new StringBuilder(chars.length);
        boolean initial = true;
        for (char c : chars) {
            if (initial) {
                initial = false;
                displayName.append(c);
            } else {
                if (c == '_') {
                    initial = true;
                    displayName.append(' ');
                } else {
                    displayName.append(Character.toLowerCase(c));
                }
            }
        }

        return displayName.toString();

    }

}

@@ -741,68 +741,518 @@
 .0d)
-, FIRST_QUARTER(0.25d), FULL_MOON(0.5d), LAST_QUARTER(0.75d)
+ %7B%0A        @Override%0A        public MoonEventType opposite() %7B%0A            return FULL_MOON;%0A        %7D%0A    %7D,%0A    FIRST_QUARTER(0.25d) %7B%0A        @Override%0A        public MoonEventType opposite() %7B%0A            return LAST_QUARTER;%0A        %7D%0A    %7D,%0A    FULL_MOON(0.5d) %7B%0A        @Override%0A        public MoonEventType opposite() %7B%0A            return NEW_MOON;%0A        %7D%0A    %7D,%0A    LAST_QUARTER(0.75d) %7B%0A        @Override%0A        public MoonEventType opposite() %7B%0A            return FIRST_QUARTER;%0A        %7D%0A    %7D
 ;%0A%0A 
@@ -2106,18 +2106,64 @@
 ring();%0A
-%0A
     %7D%0A%0A
+    public abstract MoonEventType opposite();%0A%0A
 %7D%0A

add moonEventType#opposite()