Simon Hunt | e982815 | 2015-05-01 17:54:25 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Simon Hunt | e982815 | 2015-05-01 17:54:25 -0700 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
Simon Hunt | e982815 | 2015-05-01 17:54:25 -0700 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | package org.onosproject.ui.table; |
| 18 | |
| 19 | /** |
| 20 | * Defines a formatter for cell values. |
| 21 | */ |
| 22 | public interface CellFormatter { |
| 23 | |
| 24 | /** |
| 25 | * Formats the specified value into a string appropriate for displaying |
Simon Hunt | 3ee7f74 | 2015-05-05 10:18:20 -0700 | [diff] [blame] | 26 | * in a table cell. Note that null values are acceptable, and will result |
| 27 | * in the empty string. |
Simon Hunt | e982815 | 2015-05-01 17:54:25 -0700 | [diff] [blame] | 28 | * |
| 29 | * @param value the value |
| 30 | * @return the formatted string |
| 31 | */ |
| 32 | String format(Object value); |
| 33 | } |