001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.html; 014 015/** 016 * Identifies possible float values for {@link HtmlDocSerializer#HTMLDOC_asideFloat}. 017 */ 018public enum AsideFloat { 019 020 /** 021 * Float right of main contents. 022 */ 023 LEFT, 024 025 /** 026 * Float left of main contents. 027 */ 028 RIGHT, 029 030 /** 031 * Float above main contents. 032 */ 033 TOP, 034 035 /** 036 * Float below main contents. 037 */ 038 BOTTOM, 039 040 /** 041 * Default value (defaults to {@link #LEFT} 042 */ 043 DEFAULT; 044 045 /** 046 * Returns <jk>true</jk> if value matches this enum. 047 * 048 * @param value The value to check against. 049 * @return <jk>true</jk> if value matches this enum. 050 */ 051 public boolean is(AsideFloat value) { 052 return this == value; 053 } 054 055 /** 056 * Returns <jk>true</jk> if any of the values match this enum. 057 * 058 * @param values The values to check against. 059 * @return <jk>true</jk> if value matches this enum. 060 */ 061 public boolean isAny(AsideFloat...values) { 062 for (AsideFloat v : values) 063 if (is(v)) 064 return true; 065 return false; 066 } 067}